mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-40170: Convert PyObject_IS_GC() macro to a function (GH-19464)
This commit is contained in:
parent
a5900ecf9f
commit
675d9a3d7a
7 changed files with 41 additions and 15 deletions
|
@ -60,6 +60,15 @@ Constructors for container types must conform to two rules:
|
|||
followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, usually near the
|
||||
end of the constructor.
|
||||
|
||||
|
||||
.. c:function:: int PyObject_IS_GC(PyObject *obj)
|
||||
|
||||
Returns non-zero if the object implements the garbage collector protocol,
|
||||
otherwise returns 0.
|
||||
|
||||
The object cannot be tracked by the garbage collector if this function returns 0.
|
||||
|
||||
|
||||
.. c:function:: int PyObject_GC_IsTracked(PyObject *op)
|
||||
|
||||
Returns 1 if the object type of *op* implements the GC protocol and *op* is being
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue