summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorMark Florisson <markflorisson88@gmail.com>2012-11-11 14:17:00 +0000
committerMark Florisson <markflorisson88@gmail.com>2012-11-11 14:19:56 +0000
commit571b4bc02f9520f6be27fb3a289a11b9264138ef (patch)
treefb612ecd4ef9b84589c5f3b3936a77c88b35634b /Cython/Utility/ModuleSetupCode.c
parenta762a4d81df2ed961ea1562ce79df584742eed36 (diff)
downloadcython-571b4bc02f9520f6be27fb3a289a11b9264138ef.tar.gz
Use __Pyx_PyIndex_Check instead of PyIndex_Check
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index f01725caf..fcb096d47 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -52,12 +52,15 @@
(PyErr_Format(PyExc_TypeError, \
"expected index value, got %.200s", Py_TYPE(o)->tp_name), \
(PyObject*)0))
- #define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
+ #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
+ !PyComplex_Check(o))
+ #define PyIndex_Check __Pyx_PyIndex_Check
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#define __PYX_BUILD_PY_SSIZE_T "i"
#else
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
+ #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000