]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-141004: Document `PyWeakref_CheckRefExact` (GH-141279) (GH-141290)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 9 Nov 2025 15:40:20 +0000 (16:40 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 15:40:20 +0000 (15:40 +0000)
gh-141004: Document `PyWeakref_CheckRefExact` (GH-141279)
(cherry picked from commit 60155329a0a83a2b9e740f0c0de41c9d44f5a053)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/c-api/weakref.rst

index c3c6cf413dcef586888ff51d7b0cd432fbe547fb..9b263bd11d787f45fd0780cdf82748d596b41e1d 100644 (file)
@@ -19,7 +19,14 @@ as much as it can.
 
 .. c:function:: int PyWeakref_CheckRef(PyObject *ob)
 
-   Return non-zero if *ob* is a reference object.  This function always succeeds.
+   Return non-zero if *ob* is a reference object or a subclass of the reference
+   type.  This function always succeeds.
+
+
+.. c:function:: int PyWeakref_CheckRefExact(PyObject *ob)
+
+   Return non-zero if *ob* is a reference object, but not a subclass of the
+   reference type.  This function always succeeds.
 
 
 .. c:function:: int PyWeakref_CheckProxy(PyObject *ob)