From: Lisandro Dalcin Date: Fri, 26 Mar 2010 17:07:54 +0000 (-0300) Subject: compatibility fix for Python 2.4 X-Git-Tag: 0.13.beta0~252 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4bb2ef8ea23e160cbd79c8e70c9e5467c462aecc;p=cython.git compatibility fix for Python 2.4 --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 72229376..56fb98b7 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2180,7 +2180,11 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility", module_name, class_name); + #if PY_VERSION_HEX < 0x02050000 + PyErr_Warn(NULL, warning); + #else PyErr_WarnEx(NULL, warning, 0); + #endif } else if (((PyTypeObject *)result)->tp_basicsize != size) { PyErr_Format(PyExc_ValueError,