Commit 9c8d1ec4 authored by Stefan Behnel's avatar Stefan Behnel

simplify Py version checks in arrayarray.h

parent f01863d4
...@@ -27,7 +27,7 @@ typedef struct arraydescr { ...@@ -27,7 +27,7 @@ typedef struct arraydescr {
int itemsize; int itemsize;
PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
#if PY_VERSION_HEX >= 0x03000000 #if PY_MAJOR_VERSION >= 3
char *formats; char *formats;
#endif #endif
} arraydescr; } arraydescr;
...@@ -55,7 +55,7 @@ struct arrayobject { ...@@ -55,7 +55,7 @@ struct arrayobject {
Py_ssize_t allocated; Py_ssize_t allocated;
struct arraydescr *ob_descr; struct arraydescr *ob_descr;
PyObject *weakreflist; /* List of weak references */ PyObject *weakreflist; /* List of weak references */
#if PY_VERSION_HEX >= 0x03000000 #if PY_MAJOR_VERSION >= 3
int ob_exports; /* Number of exported buffers */ int ob_exports; /* Number of exported buffers */
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment