1 /**
2   Mirror _cellobject.h
3   */
4 module deimos.python.cellobject;
5 
6 import deimos.python.pyport;
7 import deimos.python.object;
8 
9 extern(C):
10 
11 /// subclass of PyObject.
12 struct PyCellObject {
13     mixin PyObject_HEAD;
14     /** Content of the cell or NULL when empty */
15     PyObject* ob_ref;
16 }
17 
18 ///_
19 mixin(PyAPI_DATA!"PyTypeObject PyCell_Type");
20 
21 // D translation of C macro:
22 ///_
23 int PyCell_Check()(PyObject* op) {
24     return Py_TYPE(op) == &PyCell_Type;
25 }
26 
27 ///_
28 PyObject* PyCell_New(PyObject*);
29 ///_
30 PyObject* PyCell_Get(PyObject*);
31 ///_
32 int PyCell_Set(PyObject*, PyObject*);
33 ///_
34 int PyCell_GET()(PyObject* op) {
35     return (cast(PyCellObject*)op).ob_ref;
36 }
37 ///_
38 int PyCell_SET()(PyObject* op, PyObject* v) {
39     (cast(PyCellObject*)op).ob_ref = v;
40 }
41