summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-20 10:38:34 +0100
committerGitHub <noreply@github.com>2019-11-20 10:38:34 +0100
commit7eee5beaf87be898a679278c480e8dd0df76d351 (patch)
tree166a22474d2ca9a3eab2cddf5de4fd35715e888f /Modules
parentb8462477bfd01ff21461065d5063e6b0238ca809 (diff)
downloadcpython-git-7eee5beaf87be898a679278c480e8dd0df76d351.tar.gz
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 'Modules')
-rw-r--r--Modules/gcmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 05ca026189..518b0547d2 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -2038,9 +2038,9 @@ _PyGC_DumpShutdownStats(_PyRuntimeState *runtime)
}
void
-_PyGC_Fini(_PyRuntimeState *runtime)
+_PyGC_Fini(PyThreadState *tstate)
{
- struct _gc_runtime_state *state = &runtime->gc;
+ struct _gc_runtime_state *state = &tstate->interp->runtime->gc;
Py_CLEAR(state->garbage);
Py_CLEAR(state->callbacks);
}