bpo-46008: Stop calling _PyThreadState_Init() in new_threadstate(). (gh-29973)

This simplifies new_threadstate().  We also rename _PyThreadState_Init() to _PyThreadState_SetCurrent() to reflect what it actually does.

https://bugs.python.org/issue46008
This commit is contained in:
Eric Snow 2021-12-07 17:26:29 -07:00 committed by GitHub
parent 9b577cd01f
commit 1f384e3184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 deletions

View file

@ -127,6 +127,8 @@ static inline PyInterpreterState* _PyInterpreterState_GET(void) {
// PyThreadState functions
PyAPI_FUNC(void) _PyThreadState_SetCurrent(PyThreadState *tstate);
// We keep this around exclusively for stable ABI compatibility.
PyAPI_FUNC(void) _PyThreadState_Init(
PyThreadState *tstate);
PyAPI_FUNC(void) _PyThreadState_DeleteExcept(