summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-04-11 13:05:38 (GMT)
committerThomas Heller <theller@ctypes.org>2008-04-11 13:05:38 (GMT)
commit12c4e6478afc1fcc60b492bd48441e18882e83d9 (patch)
treede3e310f2c1f2cb86cb998749bfc8ffa80f02fa1
parent17f8429bd2aa5413113fa46a6bb10047a8cc7a64 (diff)
downloadcpython-12c4e6478afc1fcc60b492bd48441e18882e83d9.zip
cpython-12c4e6478afc1fcc60b492bd48441e18882e83d9.tar.gz
cpython-12c4e6478afc1fcc60b492bd48441e18882e83d9.tar.bz2
Move backwards compatibility macro to the correct place;
PyIndex_Check() was introduced in Python 2.5.
-rw-r--r--Modules/_ctypes/ctypes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index 7dfdb18..d0e7814 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -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