bpo-40241: Add PyObject_GC_IsTracked and PyObject_GC_IsFinalized to the public C-API by pablogsal · Pull Request #19461 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Conversation
Member
the-knights-who-say-ni
added
the
CLA signed
label
bedevere-bot
added
the
awaiting core review
label
pablogsal
requested a review
from vstinner
pablogsal
force-pushed
the
bpo-40241
branch
from
3b361bc to
6a6d61c
Compare
vstinner
reviewed
Modules/gcmodule.c Outdated
Doc/c-api/gcsupport.rst Outdated
…ed to the public C-API
pablogsal
requested a review
from vstinner
vstinner
approved these changes
vstinner
left a comment
vstinner
left a comment
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Fun fact: PyObject_GC_Track() is documented to accept "PyObject *", whereas it currently accepts "void *".
https://docs.python.org/dev/c-api/gcsupport.html#c.PyObject_GC_Track
| Py_SET_REFCNT(self, refcnt); | ||
| } | ||
| assert(!PyType_IS_GC(Py_TYPE(self)) || _PyObject_GC_IS_TRACKED(self)); | ||
| assert(!PyType_IS_GC(Py_TYPE(self)) || PyObject_GC_IsTracked(self)); |
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this change :-)
bedevere-bot
added
awaiting merge
and removed
awaiting core review
labels
pablogsal
merged commit
f13072b
into
python:master
bedevere-bot
removed
the
awaiting merge
label
pablogsal
deleted the
bpo-40241
branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment