summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-26 21:32:00 (GMT)
committerGitHub <noreply@github.com>2024-06-26 21:32:00 (GMT)
commitc052b192aaa05eeedb1bd50e0658e2d836ffa581 (patch)
treee1be65bbf070f16e1299c6542588ff78984fd484 /Python/pylifecycle.c
parentbc515b332bef0eaa3064d3b912ad660932ad8c90 (diff)
downloadcpython-c052b192aaa05eeedb1bd50e0658e2d836ffa581.zip
cpython-c052b192aaa05eeedb1bd50e0658e2d836ffa581.tar.gz
cpython-c052b192aaa05eeedb1bd50e0658e2d836ffa581.tar.bz2
[3.13] gh-120838: Add _PyThreadState_WHENCE_FINI (gh-121013)
We also add _PyThreadState_NewBound() and drop _PyThreadState_SetWhence(). This change only affects internal API. (cherry picked from commit a905721b9c5c15279e67c2f7785034b7356b2d46, AKA gh-121010) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index e5f749b..3580ca4 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -677,7 +677,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
}
PyThreadState *tstate = _PyThreadState_New(interp,
- _PyThreadState_WHENCE_INTERP);
+ _PyThreadState_WHENCE_INIT);
if (tstate == NULL) {
return _PyStatus_ERR("can't make first thread");
}
@@ -2233,7 +2233,7 @@ new_interpreter(PyThreadState **tstate_p,
goto error;
}
- tstate = _PyThreadState_New(interp, _PyThreadState_WHENCE_INTERP);
+ tstate = _PyThreadState_New(interp, _PyThreadState_WHENCE_INIT);
if (tstate == NULL) {
status = _PyStatus_NO_MEMORY();
goto error;