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