summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-07-17 22:21:24 (GMT)
committerGitHub <noreply@github.com>2024-07-17 22:21:24 (GMT)
commit81fd625b5c30cc6f417c93bad404923676ad8ca3 (patch)
tree14ee5e6a109a6f0658ceeadf9ed19dc0786458b1 /Python/pystate.c
parentf113c1a2a9d4fb2860de1bd8c05677f00fd49bd9 (diff)
downloadcpython-81fd625b5c30cc6f417c93bad404923676ad8ca3.zip
cpython-81fd625b5c30cc6f417c93bad404923676ad8ca3.tar.gz
cpython-81fd625b5c30cc6f417c93bad404923676ad8ca3.tar.bz2
gh-121621: Move asyncio_running_loop to private struct (#121939)
This avoids changing the ABI and keeps the field in the private struct.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index f77a2cc..7a272de 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -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);