[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 a905721b9c, AKA gh-121010)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-06-26 23:32:00 +02:00 committed by GitHub
parent bc515b332b
commit c052b192aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 27 additions and 27 deletions

View file

@ -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;