diff options
author | Kenta Murata <mrkn@users.noreply.github.com> | 2019-09-10 10:29:56 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-09-10 10:29:56 (GMT) |
commit | 9e61066355b4b55c873d56f5f106a22463b56862 (patch) | |
tree | 84631850736c2815505294080cf461a5d08194e6 /Modules/_ctypes | |
parent | e45b217ae0e83cfb367e9769cae59b9a5505f9b4 (diff) | |
download | cpython-9e61066355b4b55c873d56f5f106a22463b56862.zip cpython-9e61066355b4b55c873d56f5f106a22463b56862.tar.gz cpython-9e61066355b4b55c873d56f5f106a22463b56862.tar.bz2 |
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.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r-- | Modules/_ctypes/callbacks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 97463b5..d2d9a65 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -422,8 +422,8 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, static void LoadPython(void) { if (!Py_IsInitialized()) { - PyEval_InitThreads(); Py_Initialize(); + PyEval_InitThreads(); } } |