mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-36854: gcmodule.c gets its state from tstate (GH-17285)
* Add GCState type for readability * gcmodule.c now gets its gcstate from tstate * _PyGC_DumpShutdownStats() now expects tstate rather than runtime * Rename "state" to "gcstate" for readability: to avoid confusion between "state" and "tstate" for example. * collect() now only expects tstate: it gets gcstate from tstate. * Pass tstate to _PyErr_xxx() functions
This commit is contained in:
parent
9da7430675
commit
67e0de6f0b
4 changed files with 192 additions and 163 deletions
|
@ -583,7 +583,7 @@ _PyImport_Cleanup(PyThreadState *tstate)
|
|||
_PyGC_CollectNoFail();
|
||||
/* Dump GC stats before it's too late, since it uses the warnings
|
||||
machinery. */
|
||||
_PyGC_DumpShutdownStats(&_PyRuntime);
|
||||
_PyGC_DumpShutdownStats(tstate);
|
||||
|
||||
/* 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