]> granicus.if.org Git - python/commitdiff
Move backwards compatibility macro to the correct place;
authorThomas Heller <theller@ctypes.org>
Fri, 11 Apr 2008 13:05:38 +0000 (13:05 +0000)
committerThomas Heller <theller@ctypes.org>
Fri, 11 Apr 2008 13:05:38 +0000 (13:05 +0000)
PyIndex_Check() was introduced in Python 2.5.

Modules/_ctypes/ctypes.h

index 7dfdb1818b264f9984f5657aab93a8d1cf621100..d0e781421cf628a8dbd42da4b0f232abfc7e05a0 100644 (file)
@@ -10,6 +10,7 @@
 typedef int Py_ssize_t;
 #define PyInt_FromSsize_t PyInt_FromLong
 #define PyNumber_AsSsize_t(ob, exc) PyInt_AsLong(ob)
+#define PyIndex_Check(ob) PyInt_Check(ob)
 #endif
 
 #if (PY_VERSION_HEX < 0x02060000)
@@ -17,7 +18,6 @@ typedef int Py_ssize_t;
 #define PyVarObject_HEAD_INIT(type, size) \
        PyObject_HEAD_INIT(type) size,
 #define PyImport_ImportModuleNoBlock PyImport_ImportModule
-#define PyIndex_Check(ob) PyInt_Check(ob)
 #endif