PyEval_InitThreads only for older than 3.9

This commit is contained in:
Miodrag Milanovic 2021-01-02 10:22:51 +01:00
parent e76cdab6dd
commit 61b07bc9a6

View File

@ -122,7 +122,9 @@ void pyinterpreter_preinit()
void pyinterpreter_initialize() void pyinterpreter_initialize()
{ {
#if PY_VERSION_HEX < 0x03090000
PyEval_InitThreads(); PyEval_InitThreads();
#endif
m_threadState = PyEval_SaveThread(); m_threadState = PyEval_SaveThread();
PyEval_AcquireThread(m_threadState); PyEval_AcquireThread(m_threadState);