10000 bpo-28254: Add a C-API for controlling the state of the garbage collector by scoder · Pull Request #25687 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-28254: Add a C-API for controlling the state of the garbage collector #25687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-28254: Improve markup and add a What's New entry.
  • Loading branch information
scoder committed Apr 28, 2021
commit bfbadb90eeac3d6ba5c51f6d2bfe41bfa495ec37
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,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()`.
This previously required importing the :mod:`gc` module and calling
Python functions in it, which is cumbersome from C code.

Porting to Python 3.10
----------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
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.
:c:func:`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`,
corresponding to the functions in the :mod:`gc` module.
0