]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 14 Jul 2024 10:31:58 +0000 (12:31 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 10:31:58 +0000 (12:31 +0200)
(cherry picked from commit 26dfb2771236bfd96cdaa1081103f75141ecff47)

Co-authored-by: Dominic H <dom@dominic.sk>
Doc/c-api/module.rst
Misc/NEWS.d/next/Documentation/2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst [new file with mode: 0644]

index 02efb9921a9b9907956cee6df63ad9ff8defaa9d..b6b7026c629bcec46c88ea8d558d987c1157b561 100644 (file)
@@ -492,7 +492,7 @@ state:
 
    On success, return ``0``. On error, raise an exception and return ``-1``.
 
-   Return ``NULL`` if *value* is ``NULL``. It must be called with an exception
+   Return ``-1`` if *value* is ``NULL``. It must be called with an exception
    raised in this case.
 
    Example usage::
diff --git a/Misc/NEWS.d/next/Documentation/2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst b/Misc/NEWS.d/next/Documentation/2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst
new file mode 100644 (file)
index 0000000..17dc60c
--- /dev/null
@@ -0,0 +1 @@
+Fix documentation for :c:func:`PyModule_AddObjectRef`.