Skip to content
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

gh-112529: Simplify PyObject_GC_IsTracked and PyObject_GC_IsFinalized #114732

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Jan 29, 2024

Simplifies the implementations of PyObject_GC_IsTracked() and PyObject_GC_IsFinalized() in the free-threaded build's GC. The _PyObject_IS_GC() check is not necessary because every object in the free-threaded build has an ob_gc_bits field.

This also simplifies the Python bindings in gcmodule.c.

…alized

Simplifies the implementations of PyObject_GC_IsTracked() and
PyObject_GC_IsFinalized() in the free-threaded build's GC. The
_PyObject_IS_GC() check is not necessary because every object has an
ob_gc_bits fields.

This also simplifies the Python bindings in gcmodule.c.
Copy link
Contributor

@DinoV DinoV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@colesbury colesbury merged commit df5212d into python:main Feb 28, 2024
35 checks passed
@colesbury colesbury deleted the gh-112529-isgcobject branch February 28, 2024 20:38
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants