diff options
author | Victor Stinner <vstinner@python.org> | 2020-10-30 17:00:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 17:00:00 +0100 |
commit | 8b3414818f5289eac530bf38bcfbd7b2b851805c (patch) | |
tree | 7ca16e738927f6dd4be87aed29ae3a06817f9c3b /Python/import.c | |
parent | 99608c733c5960f7834adca933c02f6ddf9b1df9 (diff) | |
download | cpython-8b3414818f5289eac530bf38bcfbd7b2b851805c.tar.gz cpython-8b3414818f5289eac530bf38bcfbd7b2b851805c.zip |
bpo-42208: Pass tstate to _PyGC_CollectNoFail() (GH-23038)
Move private _PyGC_CollectNoFail() to the internal C API.
Remove the private _PyGC_CollectIfEnabled() which was just an alias
to the public PyGC_Collect() function since Python 3.8.
Rename functions:
* collect() => gc_collect_main()
* collect_with_callback() => gc_collect_with_callback()
* collect_generations() => gc_collect_generations()
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c index b79bda058db..8b9cc3066fc 100644 --- a/Python/import.c +++ b/Python/import.c @@ -566,7 +566,7 @@ _PyImport_Cleanup(PyThreadState *tstate) } Py_XDECREF(dict); /* Collect references */ - _PyGC_CollectNoFail(); + _PyGC_CollectNoFail(tstate); /* Dump GC stats before it's too late, since it uses the warnings machinery. */ _PyGC_DumpShutdownStats(tstate); @@ -626,7 +626,7 @@ _PyImport_Cleanup(PyThreadState *tstate) Py_DECREF(modules); /* Once more */ - _PyGC_CollectNoFail(); + _PyGC_CollectNoFail(tstate); #undef CLEAR_MODULE #undef STORE_MODULE_WEAKREF |