Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/odictobject.h @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 #ifndef Py_ODICTOBJECT_H | |
2 #define Py_ODICTOBJECT_H | |
3 #ifdef __cplusplus | |
4 extern "C" { | |
5 #endif | |
6 | |
7 | |
8 /* OrderedDict */ | |
9 /* This API is optional and mostly redundant. */ | |
10 | |
11 #ifndef Py_LIMITED_API | |
12 | |
13 typedef struct _odictobject PyODictObject; | |
14 | |
15 PyAPI_DATA(PyTypeObject) PyODict_Type; | |
16 PyAPI_DATA(PyTypeObject) PyODictIter_Type; | |
17 PyAPI_DATA(PyTypeObject) PyODictKeys_Type; | |
18 PyAPI_DATA(PyTypeObject) PyODictItems_Type; | |
19 PyAPI_DATA(PyTypeObject) PyODictValues_Type; | |
20 | |
21 #define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type) | |
22 #define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type) | |
23 #define PyODict_SIZE(op) PyDict_GET_SIZE((op)) | |
24 | |
25 PyAPI_FUNC(PyObject *) PyODict_New(void); | |
26 PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item); | |
27 PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key); | |
28 | |
29 /* wrappers around PyDict* functions */ | |
30 #define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), key) | |
31 #define PyODict_GetItemWithError(od, key) \ | |
32 PyDict_GetItemWithError(_PyObject_CAST(od), key) | |
33 #define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), key) | |
34 #define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od)) | |
35 #define PyODict_GetItemString(od, key) \ | |
36 PyDict_GetItemString(_PyObject_CAST(od), key) | |
37 | |
38 #endif | |
39 | |
40 #ifdef __cplusplus | |
41 } | |
42 #endif | |
43 #endif /* !Py_ODICTOBJECT_H */ |