2001-01-25 16:04:14 -04:00
|
|
|
/* Cell object interface */
|
2010-12-03 16:14:31 -04:00
|
|
|
#ifndef Py_LIMITED_API
|
2001-01-25 16:04:14 -04:00
|
|
|
#ifndef Py_CELLOBJECT_H
|
|
|
|
#define Py_CELLOBJECT_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct {
|
2017-11-28 11:56:10 -04:00
|
|
|
PyObject_HEAD
|
|
|
|
PyObject *ob_ref; /* Content of the cell or NULL when empty */
|
2001-01-25 16:04:14 -04:00
|
|
|
} PyCellObject;
|
|
|
|
|
2002-08-12 04:21:58 -03:00
|
|
|
PyAPI_DATA(PyTypeObject) PyCell_Type;
|
2001-01-25 16:04:14 -04:00
|
|
|
|
2020-02-13 13:37:17 -04:00
|
|
|
#define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type)
|
2001-01-25 16:04:14 -04:00
|
|
|
|
2002-08-12 04:21:58 -03:00
|
|
|
PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
|
|
|
|
PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
|
|
|
|
PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
|
2001-01-25 16:04:14 -04:00
|
|
|
|
|
|
|
#define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
|
2020-12-07 06:56:20 -04:00
|
|
|
#define PyCell_SET(op, v) ((void)(((PyCellObject *)(op))->ob_ref = v))
|
2001-01-25 16:04:14 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_TUPLEOBJECT_H */
|
2010-12-03 16:14:31 -04:00
|
|
|
#endif /* Py_LIMITED_API */
|