comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/cellobject.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 /* Cell object interface */
2 #ifndef Py_LIMITED_API
3 #ifndef Py_CELLOBJECT_H
4 #define Py_CELLOBJECT_H
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 typedef struct {
10 PyObject_HEAD
11 PyObject *ob_ref; /* Content of the cell or NULL when empty */
12 } PyCellObject;
13
14 PyAPI_DATA(PyTypeObject) PyCell_Type;
15
16 #define PyCell_Check(op) (Py_TYPE(op) == &PyCell_Type)
17
18 PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
19 PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
20 PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
21
22 #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
23 #define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v)
24
25 #ifdef __cplusplus
26 }
27 #endif
28 #endif /* !Py_TUPLEOBJECT_H */
29 #endif /* Py_LIMITED_API */