From 376d02813ae75f50c5ccef226bf1535ec1f9a6d6 Mon Sep 17 00:00:00 2001 From: Dominic H Date: Sun, 14 Jul 2024 11:40:50 +0200 Subject: [PATCH] Fix incorrect docs for `PyModule_AddObjectRef` --- Doc/c-api/module.rst | 2 +- .../2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Documentation/2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index ce9d5a0f758b29..3ea7aeb55d0d74 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -517,7 +517,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 index 00000000000000..17dc60c11468f4 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-07-14-11-48-10.gh-issue-121749.nxHoTk.rst @@ -0,0 +1 @@ +Fix documentation for :c:func:`PyModule_AddObjectRef`.