diff --git a/Cython/Utility/arrayarray.h b/Cython/Utility/arrayarray.h
index 7c07b735a54f97a25f6c225b6272b683097c1be9..46c1a208618ee7efec507b530ed9b3c6846225d6 100644
--- a/Cython/Utility/arrayarray.h
+++ b/Cython/Utility/arrayarray.h
@@ -27,7 +27,7 @@ typedef struct arraydescr {
     int itemsize;
     PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
     int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
-#if PY_VERSION_HEX >= 0x03000000
+#if PY_MAJOR_VERSION >= 3
     char *formats;
 #endif    
 } arraydescr;
@@ -55,7 +55,7 @@ struct arrayobject {
     Py_ssize_t allocated;
     struct arraydescr *ob_descr;
     PyObject *weakreflist; /* List of weak references */
-#if PY_VERSION_HEX >= 0x03000000
+#if PY_MAJOR_VERSION >= 3
         int ob_exports;  /* Number of exported buffers */
 #endif
 };