From 7eee5beaf87be898a679278c480e8dd0df76d351 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 20 Nov 2019 10:38:34 +0100 Subject: bpo-38858: Factorize Py_EndInterpreter() code (GH-17273) * Factorize code in common between Py_FinalizeEx() and Py_EndInterpreter(). * Py_EndInterpreter() now also calls _PyWarnings_Fini(). * Call _PyExc_Fini() and _PyGC_Fini() later in the finalization. --- Python/pystate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 99f93bb77c..8fff161dac 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1143,9 +1143,9 @@ _PyGILState_GetInterpreterStateUnsafe(void) } void -_PyGILState_Fini(_PyRuntimeState *runtime) +_PyGILState_Fini(PyThreadState *tstate) { - struct _gilstate_runtime_state *gilstate = &runtime->gilstate; + struct _gilstate_runtime_state *gilstate = &tstate->interp->runtime->gilstate; PyThread_tss_delete(&gilstate->autoTSSkey); gilstate->autoInterpreterState = NULL; } -- cgit v1.2.1