summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorscoder <stefan_ml@behnel.de>2021-04-28 16:12:16 (GMT)
committerGitHub <noreply@github.com>2021-04-28 16:12:16 (GMT)
commit3cc481b9de43c234889c8010e7da3af7c0f42319 (patch)
tree1166babff0120ad235c37789907d640eec280c8f /Doc/whatsnew
parentbaecfbd849dbf42360d3a84af6cc13160838f24d (diff)
downloadcpython-3cc481b9de43c234889c8010e7da3af7c0f42319.zip
cpython-3cc481b9de43c234889c8010e7da3af7c0f42319.tar.gz
cpython-3cc481b9de43c234889c8010e7da3af7c0f42319.tar.bz2
bpo-28254: Add a C-API for controlling the GC state (GH-25687)
Add new C-API functions to control the state of the garbage collector: PyGC_Enable(), PyGC_Disable(), PyGC_IsEnabled(), corresponding to the functions in the gc module. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.10.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 2d8bb28..37c1b8a 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -1697,6 +1697,13 @@ New Features
singleton or the ``False`` singleton.
(Contributed by Victor Stinner in :issue:`43753`.)
+* Add new functions to quickly control the garbage collector from C code:
+ :c:func:`PyGC_Enable()`,
+ :c:func:`PyGC_Disable()`,
+ :c:func:`PyGC_IsEnabled()`.
+ These functions allow to activate, deactivate and query the state of the garbage collector from C code without
+ having to import the :mod:`gc` module.
+
Porting to Python 3.10
----------------------