diff options
author | Victor Stinner <vstinner@python.org> | 2019-11-20 09:38:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 09:38:34 (GMT) |
commit | 7eee5beaf87be898a679278c480e8dd0df76d351 (patch) | |
tree | 166a22474d2ca9a3eab2cddf5de4fd35715e888f /Python/pystate.c | |
parent | b8462477bfd01ff21461065d5063e6b0238ca809 (diff) | |
download | cpython-7eee5beaf87be898a679278c480e8dd0df76d351.zip cpython-7eee5beaf87be898a679278c480e8dd0df76d351.tar.gz cpython-7eee5beaf87be898a679278c480e8dd0df76d351.tar.bz2 |
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.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 99f93bb..8fff161 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; } |