X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/7ca950d1c552a900fc8ac0e1b130ebe914b1c809..9ca1789eac7b1e6be29918e033b66d6328883575:/catacomb-python.h diff --git a/catacomb-python.h b/catacomb-python.h index fa99298..79034af 100644 --- a/catacomb-python.h +++ b/catacomb-python.h @@ -152,6 +152,11 @@ return (0); \ } +#if PY_VERSION_HEX < 0x02050000 /* Compatibility hack */ +# define ht_name name +# define ht_type type +#endif + #define root_pytype 0 #define type_pytype &PyType_Type #define INITTYPE(ty, base) do { \ @@ -237,8 +242,7 @@ extern int convszt(PyObject *, void *); extern int convbool(PyObject *, void *); extern PyObject *abstract_pynew(PyTypeObject *, PyObject *, PyObject *); extern PyObject *getbool(int); -#define DECL_GETU_(n) extern PyObject *getu##n(uint##n); -DOUINTSZ(DECL_GETU_) +extern PyObject *getulong(unsigned long); extern void *newtype(PyTypeObject *, const PyTypeObject *, const char *); extern PyObject * mkexc(PyObject *, PyObject *, const char *, PyMethodDef *);