File indexing completed on 2025-01-18 10:06:41
0001 #ifndef Py_ODICTOBJECT_H
0002 #define Py_ODICTOBJECT_H
0003 #ifdef __cplusplus
0004 extern "C" {
0005 #endif
0006
0007
0008
0009
0010
0011 #ifndef Py_LIMITED_API
0012
0013 typedef struct _odictobject PyODictObject;
0014
0015 PyAPI_DATA(PyTypeObject) PyODict_Type;
0016 PyAPI_DATA(PyTypeObject) PyODictIter_Type;
0017 PyAPI_DATA(PyTypeObject) PyODictKeys_Type;
0018 PyAPI_DATA(PyTypeObject) PyODictItems_Type;
0019 PyAPI_DATA(PyTypeObject) PyODictValues_Type;
0020
0021 #define PyODict_Check(op) PyObject_TypeCheck((op), &PyODict_Type)
0022 #define PyODict_CheckExact(op) Py_IS_TYPE((op), &PyODict_Type)
0023 #define PyODict_SIZE(op) PyDict_GET_SIZE((op))
0024
0025 PyAPI_FUNC(PyObject *) PyODict_New(void);
0026 PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
0027 PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
0028
0029
0030 #define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), (key))
0031 #define PyODict_GetItemWithError(od, key) \
0032 PyDict_GetItemWithError(_PyObject_CAST(od), (key))
0033 #define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), (key))
0034 #define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od))
0035 #define PyODict_GetItemString(od, key) \
0036 PyDict_GetItemString(_PyObject_CAST(od), (key))
0037
0038 #endif
0039
0040 #ifdef __cplusplus
0041 }
0042 #endif
0043 #endif