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

structseq.h 1.3 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
44
45
46
47
48
49
  1. /* Named tuple object interface */
  2. #ifndef Py_STRUCTSEQ_H
  3. #define Py_STRUCTSEQ_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct PyStructSequence_Field {
  8. const char *name;
  9. const char *doc;
  10. } PyStructSequence_Field;
  11. typedef struct PyStructSequence_Desc {
  12. const char *name;
  13. const char *doc;
  14. struct PyStructSequence_Field *fields;
  15. int n_in_sequence;
  16. } PyStructSequence_Desc;
  17. extern char* PyStructSequence_UnnamedField;
  18. #ifndef Py_LIMITED_API
  19. PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
  20. PyStructSequence_Desc *desc);
  21. PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
  22. PyStructSequence_Desc *desc);
  23. #endif
  24. PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
  25. PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
  26. #ifndef Py_LIMITED_API
  27. typedef PyTupleObject PyStructSequence;
  28. /* Macro, *only* to be used to fill in brand new objects */
  29. #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM(op, i, v)
  30. #define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM(op, i)
  31. #endif
  32. PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*);
  33. PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif /* !Py_STRUCTSEQ_H */
Tip!

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

Comments

Loading...