Commit dc3d4708 authored by Lisandro Dalcin's avatar Lisandro Dalcin

Fix Py_ssize_t missing in Py2.4 for ext module C-API headers

parent d6a7a3d5
...@@ -414,7 +414,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class ...@@ -414,7 +414,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
module_name, class_name); module_name, class_name);
goto bad; goto bad;
} }
if (!strict && ((PyTypeObject *)result)->tp_basicsize > (Py_ssize_t)size) { if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
PyOS_snprintf(warning, sizeof(warning), PyOS_snprintf(warning, sizeof(warning),
"%s.%s size changed, may indicate binary incompatibility", "%s.%s size changed, may indicate binary incompatibility",
module_name, class_name); module_name, class_name);
...@@ -424,7 +424,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class ...@@ -424,7 +424,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
#endif #endif
} }
else if (((PyTypeObject *)result)->tp_basicsize != (Py_ssize_t)size) { else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"%s.%s has the wrong size, try recompiling", "%s.%s has the wrong size, try recompiling",
module_name, class_name); module_name, class_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment