mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00: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
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue