]>
Commit | Line | Data |
---|---|---|
4710c53d | 1 | \r |
2 | /* Tuple object interface */\r | |
3 | \r | |
4 | #ifndef Py_STRUCTSEQ_H\r | |
5 | #define Py_STRUCTSEQ_H\r | |
6 | #ifdef __cplusplus\r | |
7 | extern "C" {\r | |
8 | #endif\r | |
9 | \r | |
10 | typedef struct PyStructSequence_Field {\r | |
11 | char *name;\r | |
12 | char *doc;\r | |
13 | } PyStructSequence_Field;\r | |
14 | \r | |
15 | typedef struct PyStructSequence_Desc {\r | |
16 | char *name;\r | |
17 | char *doc;\r | |
18 | struct PyStructSequence_Field *fields;\r | |
19 | int n_in_sequence;\r | |
20 | } PyStructSequence_Desc;\r | |
21 | \r | |
22 | extern char* PyStructSequence_UnnamedField;\r | |
23 | \r | |
24 | PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type,\r | |
25 | PyStructSequence_Desc *desc);\r | |
26 | \r | |
27 | PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type);\r | |
28 | \r | |
29 | typedef struct {\r | |
30 | PyObject_VAR_HEAD\r | |
31 | PyObject *ob_item[1];\r | |
32 | } PyStructSequence;\r | |
33 | \r | |
34 | /* Macro, *only* to be used to fill in brand new objects */\r | |
35 | #define PyStructSequence_SET_ITEM(op, i, v) \\r | |
36 | (((PyStructSequence *)(op))->ob_item[i] = v)\r | |
37 | \r | |
38 | #ifdef __cplusplus\r | |
39 | }\r | |
40 | #endif\r | |
41 | #endif /* !Py_STRUCTSEQ_H */\r |