summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-09 20:24:14 (GMT)
committerGitHub <noreply@github.com>2020-03-09 20:24:14 (GMT)
commit111e4ee52a1739e7c7221adde2fc364ef4954af2 (patch)
tree5b68666e414dbef941f07667a55ad9c4e45463b9 /Python/pylifecycle.c
parent3225b9f9739cd4bcca372d0fa939cea1ae5c6402 (diff)
downloadcpython-111e4ee52a1739e7c7221adde2fc364ef4954af2.zip
cpython-111e4ee52a1739e7c7221adde2fc364ef4954af2.tar.gz
cpython-111e4ee52a1739e7c7221adde2fc364ef4954af2.tar.bz2
bpo-39877: Py_Initialize() pass tstate to PyEval_InitThreads() (GH-18884)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index eaae5fd..c99c367 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();