Commit 9e610663 authored by Kenta Murata's avatar Kenta Murata Committed by Benjamin Peterson

Fix calling order of PyEval_InitThreads. (GH-4602)

As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
parent e45b217a
......@@ -422,8 +422,8 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
static void LoadPython(void)
{
if (!Py_IsInitialized()) {
PyEval_InitThreads();
Py_Initialize();
PyEval_InitThreads();
}
}
......
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