mirror of
https://github.com/python/cpython
synced 2026-09-29 11:35:29 +03:00
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.
This commit is contained in:
parent
b8462477bf
commit
7eee5beaf8
4 changed files with 82 additions and 58 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue