gh-121621: Move asyncio_running_loop to private struct (#121939)

This avoids changing the ABI and keeps the field in the private struct.
This commit is contained in:
Sam Gross 2024-07-17 18:21:24 -04:00 committed by GitHub
parent f113c1a2a9
commit 81fd625b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View file

@ -1499,7 +1499,7 @@ init_threadstate(_PyThreadStateImpl *_tstate,
tstate->previous_executor = NULL;
tstate->dict_global_version = 0;
tstate->asyncio_running_loop = NULL;
_tstate->asyncio_running_loop = NULL;
tstate->delete_later = NULL;
@ -1702,7 +1702,7 @@ PyThreadState_Clear(PyThreadState *tstate)
/* Don't clear tstate->pyframe: it is a borrowed reference */
Py_CLEAR(tstate->asyncio_running_loop);
Py_CLEAR(((_PyThreadStateImpl *)tstate)->asyncio_running_loop);
Py_CLEAR(tstate->dict);
Py_CLEAR(tstate->async_exc);