Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:51

0001 
0002 /* Named tuple object interface */
0003 
0004 #ifndef Py_STRUCTSEQ_H
0005 #define Py_STRUCTSEQ_H
0006 #ifdef __cplusplus
0007 extern "C" {
0008 #endif
0009 
0010 typedef struct PyStructSequence_Field {
0011     const char *name;
0012     const char *doc;
0013 } PyStructSequence_Field;
0014 
0015 typedef struct PyStructSequence_Desc {
0016     const char *name;
0017     const char *doc;
0018     PyStructSequence_Field *fields;
0019     int n_in_sequence;
0020 } PyStructSequence_Desc;
0021 
0022 PyAPI_DATA(const char * const) PyStructSequence_UnnamedField;
0023 
0024 #ifndef Py_LIMITED_API
0025 PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,
0026                                            PyStructSequence_Desc *desc);
0027 PyAPI_FUNC(int) PyStructSequence_InitType2(PyTypeObject *type,
0028                                            PyStructSequence_Desc *desc);
0029 #endif
0030 PyAPI_FUNC(PyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
0031 
0032 PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);
0033 
0034 #ifndef Py_LIMITED_API
0035 typedef PyTupleObject PyStructSequence;
0036 
0037 /* Macro, *only* to be used to fill in brand new objects */
0038 #define PyStructSequence_SET_ITEM(op, i, v) PyTuple_SET_ITEM((op), (i), (v))
0039 
0040 #define PyStructSequence_GET_ITEM(op, i) PyTuple_GET_ITEM((op), (i))
0041 #endif
0042 
0043 PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*);
0044 PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t);
0045 
0046 #ifdef __cplusplus
0047 }
0048 #endif
0049 #endif /* !Py_STRUCTSEQ_H */