version 1.1 | | version 1.2 |
---|
| | |
typedef struct { | | typedef struct { |
PyObject_HEAD | | PyObject_HEAD |
mapstruct *map; | | mapstruct *map; |
| | int valid; |
} Crossfire_Map; | | } Crossfire_Map; |
extern PyTypeObject Crossfire_MapType; | | extern PyTypeObject Crossfire_MapType; |
| | |
| | #define MAPEXISTCHECK( map ) \ |
| | { \ |
| | if (!(map) || ((map)->valid == 0)) { \ |
| | PyErr_SetString(PyExc_ReferenceError, "Crossfire map no longer exists"); \ |
| | return NULL; \ |
| | } } |
| | |
| | #define MAPEXISTCHECK_INT( map ) \ |
| | { \ |
| | if (!(map) || ((map)->valid == 0)) { \ |
| | PyErr_SetString(PyExc_ReferenceError, "Crossfire map no longer exists"); \ |
| | return -1; \ |
| | } } |
| | |
extern PyObject *Crossfire_Map_wrap(mapstruct *what); | | extern PyObject *Crossfire_Map_wrap(mapstruct *what); |
| | |
#endif /* CFPYTHON_MAP_H */ | | #endif /* CFPYTHON_MAP_H */ |