summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 15:24:01 (GMT)
committerGitHub <noreply@github.com>2019-04-24 15:24:01 (GMT)
commit8e91c246e468515b877690e090c73f496552541d (patch)
treed538530b4ac5ccf9aa6dc1e229410b8848eeb4f3 /Modules
parent70bf713617e15fad390ed953e48b3c65d9bc90ec (diff)
downloadcpython-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')
-rw-r--r--Modules/gcmodule.c5
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 */