Merged release21-maint changes.
[python/dscho.git] / Include / cellobject.h
blobcc4a159e85970ba2d9370243c3dc96b73718db24
1 /* Cell object interface */
3 #ifndef Py_CELLOBJECT_H
4 #define Py_CELLOBJECT_H
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
9 typedef struct {
10 PyObject_VAR_HEAD
11 PyObject *ob_ref;
12 } PyCellObject;
14 extern DL_IMPORT(PyTypeObject) PyCell_Type;
16 #define PyCell_Check(op) ((op)->ob_type == &PyCell_Type)
18 extern DL_IMPORT(PyObject *) PyCell_New(PyObject *);
19 extern DL_IMPORT(PyObject *) PyCell_Get(PyObject *);
20 extern DL_IMPORT(int) PyCell_Set(PyObject *, PyObject *);
22 #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
23 #define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v)
25 #ifdef __cplusplus
27 #endif
28 #endif /* !Py_TUPLEOBJECT_H */