diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-24 15:24:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-24 15:24:01 (GMT) |
commit | 8e91c246e468515b877690e090c73f496552541d (patch) | |
tree | d538530b4ac5ccf9aa6dc1e229410b8848eeb4f3 /Modules/gcmodule.c | |
parent | 70bf713617e15fad390ed953e48b3c65d9bc90ec (diff) | |
download | cpython-8e91c246e468515b877690e090c73f496552541d.zip cpython-8e91c246e468515b877690e090c73f496552541d.tar.gz cpython-8e91c246e468515b877690e090c73f496552541d.tar.bz2 |
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()
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index a75d5fe..f36c7f5 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -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 */ |