Commit 9a97b2ab authored by Stefan Behnel's avatar Stefan Behnel

use potentially faster thread-state access

parent 8a9d9d36
...@@ -11,7 +11,15 @@ ...@@ -11,7 +11,15 @@
#if CYTHON_FAST_THREAD_STATE #if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *$local_tstate_cname; #define __Pyx_PyThreadState_declare PyThreadState *$local_tstate_cname;
#define __Pyx_PyThreadState_assign $local_tstate_cname = PyThreadState_GET(); #if PY_VERSION_HEX >= 0x03050000
#define __Pyx_PyThreadState_assign $local_tstate_cname = _PyThreadState_UncheckedGet();
#elif PY_VERSION_HEX >= 0x03000000
#define __Pyx_PyThreadState_assign $local_tstate_cname = PyThreadState_Get();
#elif PY_VERSION_HEX >= 0x02070000
#define __Pyx_PyThreadState_assign $local_tstate_cname = _PyThreadState_Current;
#else
#define __Pyx_PyThreadState_assign $local_tstate_cname = PyThreadState_Get();
#endif
#else #else
#define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign #define __Pyx_PyThreadState_assign
......
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