jpayne@69: /* Cell object interface */ jpayne@69: #ifndef Py_LIMITED_API jpayne@69: #ifndef Py_CELLOBJECT_H jpayne@69: #define Py_CELLOBJECT_H jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: typedef struct { jpayne@69: PyObject_HEAD jpayne@69: PyObject *ob_ref; /* Content of the cell or NULL when empty */ jpayne@69: } PyCellObject; jpayne@69: jpayne@69: PyAPI_DATA(PyTypeObject) PyCell_Type; jpayne@69: jpayne@69: #define PyCell_Check(op) (Py_TYPE(op) == &PyCell_Type) jpayne@69: jpayne@69: PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); jpayne@69: PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); jpayne@69: PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); jpayne@69: jpayne@69: #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) jpayne@69: #define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v) jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: #endif /* !Py_TUPLEOBJECT_H */ jpayne@69: #endif /* Py_LIMITED_API */