summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2019-11-20 10:48:18 (GMT)
committerGitHub <noreply@github.com>2019-11-20 10:48:18 (GMT)
commit67e0de6f0b060ac8f373952f0ca4b3117ad5b611 (patch)
tree43d5fab7d2fe3db5040fdd444b8ef205d9ff685e /Python/import.c
parent9da7430675ceaeae5abeb9c9f7cd552b71b3a93a (diff)
downloadcpython-67e0de6f0b060ac8f373952f0ca4b3117ad5b611.zip
cpython-67e0de6f0b060ac8f373952f0ca4b3117ad5b611.tar.gz
cpython-67e0de6f0b060ac8f373952f0ca4b3117ad5b611.tar.bz2
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
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index cbd0fa8..ac3d10c 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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