Chris@87: Chris@87: /* Tuple object interface */ Chris@87: Chris@87: #ifndef Py_STRUCTSEQ_H Chris@87: #define Py_STRUCTSEQ_H Chris@87: #ifdef __cplusplus Chris@87: extern "C" { Chris@87: #endif Chris@87: Chris@87: typedef struct PyStructSequence_Field { Chris@87: char *name; Chris@87: char *doc; Chris@87: } PyStructSequence_Field; Chris@87: Chris@87: typedef struct PyStructSequence_Desc { Chris@87: char *name; Chris@87: char *doc; Chris@87: struct PyStructSequence_Field *fields; Chris@87: int n_in_sequence; Chris@87: } PyStructSequence_Desc; Chris@87: Chris@87: extern char* PyStructSequence_UnnamedField; Chris@87: Chris@87: PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, Chris@87: PyStructSequence_Desc *desc); Chris@87: Chris@87: PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type); Chris@87: Chris@87: typedef struct { Chris@87: PyObject_VAR_HEAD Chris@87: PyObject *ob_item[1]; Chris@87: } PyStructSequence; Chris@87: Chris@87: /* Macro, *only* to be used to fill in brand new objects */ Chris@87: #define PyStructSequence_SET_ITEM(op, i, v) \ Chris@87: (((PyStructSequence *)(op))->ob_item[i] = v) Chris@87: Chris@87: #ifdef __cplusplus Chris@87: } Chris@87: #endif Chris@87: #endif /* !Py_STRUCTSEQ_H */