home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Software / TemaCD / webclean / !!!python!!! / BeOpen-Python-2.0.exe / DICTOBJECT.H < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-01  |  1.3 KB  |  36 lines

  1. #ifndef Py_DICTOBJECT_H
  2. #define Py_DICTOBJECT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7.  
  8. /* Dictionary object type -- mapping from hashable object to object */
  9.  
  10. extern DL_IMPORT(PyTypeObject) PyDict_Type;
  11.  
  12. #define PyDict_Check(op) ((op)->ob_type == &PyDict_Type)
  13.  
  14. extern DL_IMPORT(PyObject *) PyDict_New(void);
  15. extern DL_IMPORT(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
  16. extern DL_IMPORT(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
  17. extern DL_IMPORT(int) PyDict_DelItem(PyObject *mp, PyObject *key);
  18. extern DL_IMPORT(void) PyDict_Clear(PyObject *mp);
  19. extern DL_IMPORT(int) PyDict_Next
  20.     (PyObject *mp, int *pos, PyObject **key, PyObject **value);
  21. extern DL_IMPORT(PyObject *) PyDict_Keys(PyObject *mp);
  22. extern DL_IMPORT(PyObject *) PyDict_Values(PyObject *mp);
  23. extern DL_IMPORT(PyObject *) PyDict_Items(PyObject *mp);
  24. extern DL_IMPORT(int) PyDict_Size(PyObject *mp);
  25. extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp);
  26.  
  27.  
  28. extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key);
  29. extern DL_IMPORT(int) PyDict_SetItemString(PyObject *dp, char *key, PyObject *item);
  30. extern DL_IMPORT(int) PyDict_DelItemString(PyObject *dp, char *key);
  31.  
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif /* !Py_DICTOBJECT_H */
  36.