Skip to content

Commit 7b41f63

Browse files
author
Peter Bierma
committed
Update documentation.
1 parent f0cf865 commit 7b41f63

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Doc/c-api/object.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,18 @@ Object Protocol
575575
has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set.
576576
577577
.. versionadded:: 3.13
578+
579+
.. c:function:: int PyUnstable_Object_SetDeferredRefcount(PyObject *obj)
580+
581+
Enable `deferred reference counting https://peps.python.org/pep-0703/#deferred-reference-counting`_ on *obj*.
582+
583+
*obj* must be an object tracked by the garbage collector (see :func:`gc.is_tracked`), must have been
584+
created by the calling thread, and must not be in use by any existing threads.
585+
586+
If any of the above conditions are not met, this function returns a negative value
587+
and sets an exception.
588+
589+
This function is a no-op on builds with the :term:`GIL` enabled.
590+
591+
.. versionadded:: 3.14
592+

0 commit comments

Comments
 (0)