Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

odictobject.h 1.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  1. #ifndef Py_ODICTOBJECT_H
  2. #define Py_ODICTOBJECT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* OrderedDict */
  7. /* This API is optional and mostly redundant. */
  8. #ifndef Py_LIMITED_API
  9. typedef struct _odictobject PyODictObject;
  10. PyAPI_DATA(PyTypeObject) PyODict_Type;
  11. PyAPI_DATA(PyTypeObject) PyODictIter_Type;
  12. PyAPI_DATA(PyTypeObject) PyODictKeys_Type;
  13. PyAPI_DATA(PyTypeObject) PyODictItems_Type;
  14. PyAPI_DATA(PyTypeObject) PyODictValues_Type;
  15. #define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type)
  16. #define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
  17. #define PyODict_SIZE(op) PyDict_GET_SIZE((op))
  18. PyAPI_FUNC(PyObject *) PyODict_New(void);
  19. PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
  20. PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
  21. /* wrappers around PyDict* functions */
  22. #define PyODict_GetItem(od, key) PyDict_GetItem((PyObject *)od, key)
  23. #define PyODict_GetItemWithError(od, key) \
  24. PyDict_GetItemWithError((PyObject *)od, key)
  25. #define PyODict_Contains(od, key) PyDict_Contains((PyObject *)od, key)
  26. #define PyODict_Size(od) PyDict_Size((PyObject *)od)
  27. #define PyODict_GetItemString(od, key) \
  28. PyDict_GetItemString((PyObject *)od, key)
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* !Py_ODICTOBJECT_H */
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...