aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2024-06-25 14:35:12 -0600
committerGitHub <noreply@github.com>2024-06-25 14:35:12 -0600
commita905721b9c5c15279e67c2f7785034b7356b2d46 (patch)
tree128afaafee27cac1e55fe22e552a2e41ac8921ef /Python/pylifecycle.c
parent769aea332940f03c3e5b1ad9badd6635c1ac992a (diff)
downloadcpython-a905721b9c5c15279e67c2f7785034b7356b2d46.tar.gz
cpython-a905721b9c5c15279e67c2f7785034b7356b2d46.zip
gh-120838: Add _PyThreadState_WHENCE_FINI (gh-121010)
We also add _PyThreadState_NewBound() and drop _PyThreadState_SetWhence(). This change only affects internal API.
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 a7b4d7ecc7c..9b599cba241 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;