Commit 9db03247 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-36710: Add runtime parameter in gcmodule.c (GH-12958)

Add 'state' or 'runtime' parameter to functions in gcmodule.c to
avoid to rely directly on the global variable _PyRuntime.
parent 10c8e6af
...@@ -83,7 +83,7 @@ extern void _PyGILState_Init( ...@@ -83,7 +83,7 @@ extern void _PyGILState_Init(
PyThreadState *tstate); PyThreadState *tstate);
extern void _PyGILState_Fini(_PyRuntimeState *runtime); extern void _PyGILState_Fini(_PyRuntimeState *runtime);
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void); PyAPI_FUNC(void) _PyGC_DumpShutdownStats(_PyRuntimeState *runtime);
PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromCoreConfig( PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromCoreConfig(
const _PyCoreConfig *coreconfig); const _PyCoreConfig *coreconfig);
......
This diff is collapsed.
...@@ -535,7 +535,7 @@ PyImport_Cleanup(void) ...@@ -535,7 +535,7 @@ PyImport_Cleanup(void)
_PyGC_CollectNoFail(); _PyGC_CollectNoFail();
/* Dump GC stats before it's too late, since it uses the warnings /* Dump GC stats before it's too late, since it uses the warnings
machinery. */ machinery. */
_PyGC_DumpShutdownStats(); _PyGC_DumpShutdownStats(&_PyRuntime);
/* Now, if there are any modules left alive, clear their globals to /* Now, if there are any modules left alive, clear their globals to
minimize potential leaks. All C extension modules actually end minimize potential leaks. All C extension modules actually end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment