bpo-36710: Add runtime variable to Py_FinalizeEx() (GH-12937)

* Add a 'runtime' variable to Py_FinalizeEx() rather than working
  directly on the global variable _PyRuntime
* Add a 'runtime' parameter to _PyGC_Fini(), _PyGILState_Fini()
  and call_ll_exitfuncs()
This commit is contained in:
Victor Stinner 2019-04-24 17:24:01 +02:00 committed by GitHub
parent 70bf713617
commit 8e91c246e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 24 deletions

View file

@ -1865,9 +1865,10 @@ _PyGC_DumpShutdownStats(void)
}
void
_PyGC_Fini(void)
_PyGC_Fini(_PyRuntimeState *runtime)
{
Py_CLEAR(_PyRuntime.gc.callbacks);
struct _gc_runtime_state *gc = &runtime->gc;
Py_CLEAR(gc->callbacks);
}
/* for debugging */