Commit faf63c64 authored by Stefan Behnel's avatar Stefan Behnel

PyPy fix

parent dab872a7
...@@ -79,14 +79,21 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, ...@@ -79,14 +79,21 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
} }
#if PY_VERSION_HEX < 0x02050000 #if PY_VERSION_HEX < 0x02050000
if (PyClass_Check(type)) if (PyClass_Check(type)) {
#else #else
if (PyType_Check(type)) if (PyType_Check(type)) {
#endif #endif
/* instantiate the type now (we don't know when and how it will be caught) */ /* instantiate the type now (we don't know when and how it will be caught) */
#if CYTHON_COMPILING_IN_PYPY
/* PyPy can't handle value == NULL */
if (!value) {
Py_INCREF(Py_None);
value = Py_None;
}
#endif
PyErr_NormalizeException(&type, &value, &tb); PyErr_NormalizeException(&type, &value, &tb);
else { } else {
/* Raising an instance. The value should be a dummy. */ /* Raising an instance. The value should be a dummy. */
if (value) { if (value) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
......
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