diff options
Diffstat (limited to 'Doc/c-api/weakref.rst')
-rw-r--r-- | Doc/c-api/weakref.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst index 8f233e1..c3c6cf4 100644 --- a/Doc/c-api/weakref.rst +++ b/Doc/c-api/weakref.rst @@ -88,6 +88,15 @@ as much as it can. Use :c:func:`PyWeakref_GetRef` instead. +.. c:function:: int PyWeakref_IsDead(PyObject *ref) + + Test if the weak reference *ref* is dead. Returns 1 if the reference is + dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak + reference object. + + .. versionadded:: 3.14 + + .. c:function:: void PyObject_ClearWeakRefs(PyObject *object) This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler |