diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-09 21:24:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 21:24:14 +0100 |
commit | 111e4ee52a1739e7c7221adde2fc364ef4954af2 (patch) | |
tree | 5b68666e414dbef941f07667a55ad9c4e45463b9 /Python/pylifecycle.c | |
parent | 3225b9f9739cd4bcca372d0fa939cea1ae5c6402 (diff) | |
download | cpython-git-111e4ee52a1739e7c7221adde2fc364ef4954af2.tar.gz |
bpo-39877: Py_Initialize() pass tstate to PyEval_InitThreads() (GH-18884)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index eaae5fdbb6..c99c3673d7 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -554,7 +554,10 @@ pycore_create_interpreter(_PyRuntimeState *runtime, _PyGILState_Init(tstate); /* Create the GIL */ - PyEval_InitThreads(); + status = _PyEval_InitThreads(tstate); + if (_PyStatus_EXCEPTION(status)) { + return status; + } *tstate_p = tstate; return _PyStatus_OK(); |