diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2023-03-24 11:23:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 11:23:35 (GMT) |
commit | 6a1c49a7176f29435e71a326866d952b686bceb3 (patch) | |
tree | fd69f14a8c3316a3eed95e09f6ef9cfc5d2bcfe3 /Doc/c-api/weakref.rst | |
parent | d49409196e0c73c38e3f96cf860cbffda40607ec (diff) | |
download | cpython-6a1c49a7176f29435e71a326866d952b686bceb3.zip cpython-6a1c49a7176f29435e71a326866d952b686bceb3.tar.gz cpython-6a1c49a7176f29435e71a326866d952b686bceb3.tar.bz2 |
gh-101100: Test docs in nit-picky mode (#102513)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Doc/c-api/weakref.rst')
-rw-r--r-- | Doc/c-api/weakref.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/c-api/weakref.rst b/Doc/c-api/weakref.rst index ace743b..f27ec44 100644 --- a/Doc/c-api/weakref.rst +++ b/Doc/c-api/weakref.rst @@ -67,3 +67,13 @@ as much as it can. .. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref) Similar to :c:func:`PyWeakref_GetObject`, but does no error checking. + + +.. c:function:: void PyObject_ClearWeakRefs(PyObject *object) + + This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler + to clear weak references. + + This iterates through the weak references for *object* and calls callbacks + for those references which have one. It returns when all callbacks have + been attempted. |