Mercurial > cpython-lru_cache-weakref
diff Modules/_ctypes/ctypes.h @ 46402:bc33770ca114 legacy-trunk
Move backwards compatibility macro to the correct place;
PyIndex_Check() was introduced in Python 2.5.
| author | Thomas Heller <theller@ctypes.org> |
|---|---|
| date | Fri, 11 Apr 2008 13:05:38 +0000 |
| parents | d818f6d29384 |
| children | b3dca8f5535e |
line wrap: on
line diff
--- a/Modules/_ctypes/ctypes.h Thu Apr 10 21:29:01 2008 +0000 +++ b/Modules/_ctypes/ctypes.h Fri Apr 11 13:05:38 2008 +0000 @@ -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 @@ #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, #define PyImport_ImportModuleNoBlock PyImport_ImportModule -#define PyIndex_Check(ob) PyInt_Check(ob) #endif
