Skip to content

Commit

Permalink
Merge branch 'api-deferred-rc' of https://github.com/ZeroIntensity/cp…
Browse files Browse the repository at this point in the history
…ython into api-deferred-rc
  • Loading branch information
ZeroIntensity committed Nov 4, 2024
2 parents 55443b6 + 4c29547 commit 00debea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,18 @@ Object Protocol
which may improve multi-threaded performance. The tradeoff is
that *obj* will only be deallocated by the tracing garbage collector.
This function returns ``1`` if deferred reference counting was enabled on *obj*,
This function returns ``1`` if deferred reference counting is enabled on *obj*
(including when it was enabled before the call),
and ``0`` if deferred reference counting is not supported or if the hint was
ignored by the runtime. This function is thread-safe, and cannot fail.
This function is a no-op on builds with the :term:`GIL` enabled, which do
not support deferred reference counting. This also no-ops if *obj* is not
This function does nothing on builds with the :term:`GIL` enabled, which do
not support deferred reference counting. This also does nothing if *obj* is not
an object tracked by the garbage collector (see :func:`gc.is_tracked` and
:c:func:`PyObject_GC_IsTracked`).
This function is intended to be used soon after *obj* is created,
by the code that creates it.
.. versionadded:: next

0 comments on commit 00debea

Please sign in to comment.