diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index a1453a393b895caa32962e5dbe00c40d416fe5ed..b1da8f19ec737206f0a7e63f37707b4773c1a8d1 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -523,9 +523,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): #endif #if PY_VERSION_HEX < 0x02050000 - typedef long Py_ssize_t; - #define PY_SSIZE_T_MAX LONG_MAX - #define PY_SSIZE_T_MIN LONG_MIN + typedef int Py_ssize_t; + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN #define PY_FORMAT_SIZE_T \"\" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_AsSsize_t(o) PyInt_AsLong(o)