Commit dba5f6bb authored by Stefan Behnel's avatar Stefan Behnel

Stop calling PyEval_InitThreads() In Py3.7+ (where it has become a no-op).

parent 06446339
......@@ -2406,11 +2406,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.put_error_if_neg(self.pos, "_import_array()")
code.putln("/*--- Threads initialization code ---*/")
code.putln("#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS")
code.putln("#ifdef WITH_THREAD /* Python build with threading support? */")
code.putln("#if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 "
"&& defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS")
code.putln("PyEval_InitThreads();")
code.putln("#endif")
code.putln("#endif")
code.putln("/*--- Module creation code ---*/")
self.generate_module_creation_code(env, code)
......
......@@ -922,7 +922,7 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc
/////////////// InitThreads.init ///////////////
#ifdef WITH_THREAD
#if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0
PyEval_InitThreads();
#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