blob: f3eef55e49416d6a82b0c14cbc8d1ecd024efa4a [file] [log] [blame]
Jeremy Hyltonfbd849f2001-01-25 20:04:14 +00001/* Cell object interface */
2
3#ifndef Py_CELLOBJECT_H
4#define Py_CELLOBJECT_H
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef struct {
Jeremy Hylton31e233a2002-02-28 23:46:34 +000010 PyObject_HEAD
Jeremy Hyltonfbd849f2001-01-25 20:04:14 +000011 PyObject *ob_ref;
12} PyCellObject;
13
14extern DL_IMPORT(PyTypeObject) PyCell_Type;
15
16#define PyCell_Check(op) ((op)->ob_type == &PyCell_Type)
17
18extern DL_IMPORT(PyObject *) PyCell_New(PyObject *);
19extern DL_IMPORT(PyObject *) PyCell_Get(PyObject *);
20extern DL_IMPORT(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 */