jpayne@69: #ifndef Py_ODICTOBJECT_H jpayne@69: #define Py_ODICTOBJECT_H jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: /* OrderedDict */ jpayne@69: /* This API is optional and mostly redundant. */ jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: jpayne@69: typedef struct _odictobject PyODictObject; jpayne@69: jpayne@69: PyAPI_DATA(PyTypeObject) PyODict_Type; jpayne@69: PyAPI_DATA(PyTypeObject) PyODictIter_Type; jpayne@69: PyAPI_DATA(PyTypeObject) PyODictKeys_Type; jpayne@69: PyAPI_DATA(PyTypeObject) PyODictItems_Type; jpayne@69: PyAPI_DATA(PyTypeObject) PyODictValues_Type; jpayne@69: jpayne@69: #define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type) jpayne@69: #define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type) jpayne@69: #define PyODict_SIZE(op) PyDict_GET_SIZE((op)) jpayne@69: jpayne@69: PyAPI_FUNC(PyObject *) PyODict_New(void); jpayne@69: PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item); jpayne@69: PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key); jpayne@69: jpayne@69: /* wrappers around PyDict* functions */ jpayne@69: #define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), key) jpayne@69: #define PyODict_GetItemWithError(od, key) \ jpayne@69: PyDict_GetItemWithError(_PyObject_CAST(od), key) jpayne@69: #define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), key) jpayne@69: #define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od)) jpayne@69: #define PyODict_GetItemString(od, key) \ jpayne@69: PyDict_GetItemString(_PyObject_CAST(od), key) jpayne@69: jpayne@69: #endif jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: #endif /* !Py_ODICTOBJECT_H */