summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 6aaf993cfe..498a9546e1 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -1078,10 +1078,11 @@ _PyGILState_GetInterpreterStateUnsafe(void)
}
void
-_PyGILState_Fini(void)
+_PyGILState_Fini(_PyRuntimeState *runtime)
{
- PyThread_tss_delete(&_PyRuntime.gilstate.autoTSSkey);
- _PyRuntime.gilstate.autoInterpreterState = NULL;
+ struct _gilstate_runtime_state *gilstate = &runtime->gilstate;
+ PyThread_tss_delete(&gilstate->autoTSSkey);
+ gilstate->autoInterpreterState = NULL;
}
/* Reset the TSS key - called by PyOS_AfterFork_Child().