[Cython] redefining PyIndex_Check

Stefan Behnel stefan_ml at behnel.de
Sun Nov 11 09:12:58 CET 2012


Hi,

instead of overriding an existing definition of "PyIndex_Check" like this:

"""
+#if PY_VERSION_HEX < 0x02050000
+    /* NumPy headers define PyIndex_Check incorrectly */
+    #undef PyIndex_Check
+    #define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) &&
!PyComplex_Check(o))
+#endif
"""

which may or may not have come from NumPy, shouldn't we be using our own
definition of a "__Pyx_PyIndex_Check" in our code instead?

Stefan


More information about the cython-devel mailing list