Commit 4bb2ef8e authored by Lisandro Dalcin's avatar Lisandro Dalcin

compatibility fix for Python 2.4

parent 8b6332e4
...@@ -2180,7 +2180,11 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class ...@@ -2180,7 +2180,11 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class
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);
#if PY_VERSION_HEX < 0x02050000
PyErr_Warn(NULL, warning);
#else
PyErr_WarnEx(NULL, warning, 0); PyErr_WarnEx(NULL, warning, 0);
#endif
} }
else if (((PyTypeObject *)result)->tp_basicsize != size) { else if (((PyTypeObject *)result)->tp_basicsize != size) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
......
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