summaryrefslogtreecommitdiff
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 17:24:01 +0200
committerGitHub <noreply@github.com>2019-04-24 17:24:01 +0200
commit8e91c246e468515b877690e090c73f496552541d (patch)
treed538530b4ac5ccf9aa6dc1e229410b8848eeb4f3 /Modules/gcmodule.c
parent70bf713617e15fad390ed953e48b3c65d9bc90ec (diff)
downloadcpython-git-8e91c246e468515b877690e090c73f496552541d.tar.gz
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index a75d5fed95..f36c7f5d5e 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 */