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.
This commit is contained in:
Kenta Murata 2019-09-10 19:29:56 +09:00 committed by Benjamin Peterson
parent e45b217ae0
commit 9e61066355
1 changed files with 1 additions and 1 deletions

View File

@ -422,8 +422,8 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
static void LoadPython(void)
{
if (!Py_IsInitialized()) {
PyEval_InitThreads();
Py_Initialize();
PyEval_InitThreads();
}
}