summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-10-30 16:00:00 (GMT)
committerGitHub <noreply@github.com>2020-10-30 16:00:00 (GMT)
commit8b3414818f5289eac530bf38bcfbd7b2b851805c (patch)
tree7ca16e738927f6dd4be87aed29ae3a06817f9c3b /Include/internal
parent99608c733c5960f7834adca933c02f6ddf9b1df9 (diff)
downloadcpython-8b3414818f5289eac530bf38bcfbd7b2b851805c.zip
cpython-8b3414818f5289eac530bf38bcfbd7b2b851805c.tar.gz
cpython-8b3414818f5289eac530bf38bcfbd7b2b851805c.tar.bz2
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 'Include/internal')
-rw-r--r--Include/internal/pycore_gc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h
index da202a1..e2d47c9 100644
--- a/Include/internal/pycore_gc.h
+++ b/Include/internal/pycore_gc.h
@@ -161,7 +161,9 @@ struct _gc_runtime_state {
Py_ssize_t long_lived_pending;
};
-PyAPI_FUNC(void) _PyGC_InitState(struct _gc_runtime_state *);
+extern void _PyGC_InitState(struct _gc_runtime_state *);
+
+extern Py_ssize_t _PyGC_CollectNoFail(PyThreadState *tstate);
// Functions to clear types free lists