mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix calling order of PyEval_InitThreads. (GH-15836)
As described in Doc/c-api/init.rst, PyEval_InitThreads() cannot be called
before Py_Initialize() function.
(cherry picked from commit 9e61066355
)
Co-authored-by: Kenta Murata <mrkn@users.noreply.github.com>
This commit is contained in:
parent
ed99bb9ca6
commit
21dacea6ad
1 changed files with 1 additions and 1 deletions
|
@ -422,8 +422,8 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
|
||||||
static void LoadPython(void)
|
static void LoadPython(void)
|
||||||
{
|
{
|
||||||
if (!Py_IsInitialized()) {
|
if (!Py_IsInitialized()) {
|
||||||
PyEval_InitThreads();
|
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
|
PyEval_InitThreads();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue