29 #ifndef CFPYTHON_OBJECT_H
30 #define CFPYTHON_OBJECT_H
48 #define EXISTCHECK(ob) { \
49 if (!ob || !ob->obj || (was_destroyed(ob->obj, ob->obj->count))) { \
50 PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
59 #define TYPEEXISTCHECK(ob) { \
60 if (!ob || !PyObject_TypeCheck((PyObject*)ob, &Crossfire_ObjectType) || !ob->obj || (was_destroyed(ob->obj, ob->obj->count))) { \
61 PyErr_SetString(PyExc_ReferenceError, "Not a Crossfire object or Crossfire object no longer exists"); \
65 #define EXISTCHECK_INT(ob) { \
66 if (!ob || !ob->obj || (was_destroyed(ob->obj, ob->obj->count))) { \
67 PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
PyObject_HEAD object * obj
PyTypeObject Crossfire_PlayerType
PyObject_HEAD object * obj
PyTypeObject Crossfire_ObjectType