Commit 7e4aaf0c authored by Stefan Behnel's avatar Stefan Behnel

macro fix for Py2.4 in C++ mode

parent 17ebc936
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
#define PY_FORMAT_SIZE_T "" #define PY_FORMAT_SIZE_T ""
#define PyInt_FromSsize_t(z) PyInt_FromLong(z) #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
#define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o)
#define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? \ #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
PyNumber_Int(o) \ (PyErr_Format(PyExc_TypeError, \
: (PyErr_Format(PyExc_TypeError, "expected index value, got %.200s", \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
Py_TYPE(o)->tp_name), NULL)) (PyObject*)0))
#define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o)) #define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#define __PYX_BUILD_PY_SSIZE_T "i" #define __PYX_BUILD_PY_SSIZE_T "i"
......
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