mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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.
This commit is contained in:
parent
10c8e6af91
commit
9db0324712
3 changed files with 166 additions and 142 deletions
|
@ -535,7 +535,7 @@ PyImport_Cleanup(void)
|
|||
_PyGC_CollectNoFail();
|
||||
/* Dump GC stats before it's too late, since it uses the warnings
|
||||
machinery. */
|
||||
_PyGC_DumpShutdownStats();
|
||||
_PyGC_DumpShutdownStats(&_PyRuntime);
|
||||
|
||||
/* Now, if there are any modules left alive, clear their globals to
|
||||
minimize potential leaks. All C extension modules actually end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue