Commit 6f49b620 authored by Robert Bradshaw's avatar Robert Bradshaw

More PyCapsule avoidance on Python 2.6.

parent e213ef5b
...@@ -54,7 +54,9 @@ static void* __Pyx_FetchCommonPointer(void* pointer, const char* name); ...@@ -54,7 +54,9 @@ static void* __Pyx_FetchCommonPointer(void* pointer, const char* name);
/////////////// FetchCommonPointer /////////////// /////////////// FetchCommonPointer ///////////////
static void* __Pyx_FetchCommonPointer(void* pointer, const char* name) { static void* __Pyx_FetchCommonPointer(void* pointer, const char* name) {
#if PY_VERSION_HEX >= 0x02070000
PyObject* fake_module = NULL; PyObject* fake_module = NULL;
PyObject* capsule = NULL; PyObject* capsule = NULL;
void* value = NULL; void* value = NULL;
...@@ -78,4 +80,7 @@ bad: ...@@ -78,4 +80,7 @@ bad:
Py_XDECREF(capsule); Py_XDECREF(capsule);
Py_DECREF(fake_module); Py_DECREF(fake_module);
return value; return value;
#else
return pointer;
#endif
} }
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