source: trunk/include/python2.4/cellobject.h @ 490

Last change on this file since 490 was 88, checked in by cxsong, 19 years ago

copied from /opt/rappture/include

File size: 653 bytes
Line 
1/* Cell object interface */
2
3#ifndef Py_CELLOBJECT_H
4#define Py_CELLOBJECT_H
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef struct {
10        PyObject_HEAD
11        PyObject *ob_ref;       /* Content of the cell or NULL when empty */
12} PyCellObject;
13
14PyAPI_DATA(PyTypeObject) PyCell_Type;
15
16#define PyCell_Check(op) ((op)->ob_type == &PyCell_Type)
17
18PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
19PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
20PyAPI_FUNC(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 */
Note: See TracBrowser for help on using the repository browser.