]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-144257: document return values of PyModule_SetDocString (GH-144258) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 27 Jan 2026 07:21:38 +0000 (08:21 +0100)
committerGitHub <noreply@github.com>
Tue, 27 Jan 2026 07:21:38 +0000 (07:21 +0000)
gh-144257: document return values of PyModule_SetDocString (GH-144258)
(cherry picked from commit 3e9a5b022f01fa95b4485fcf2c0c87bfb9fff837)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Doc/c-api/module.rst

index 11b488e4e520695aea5668848174c38be2835b8e..eed47c8966c473882f268bc37fac0b958461b0ea 100644 (file)
@@ -675,6 +675,9 @@ or code that creates modules dynamically.
    ``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`,
    ``PyModule_Create``, or ``PyModule_FromDefAndSpec``).
 
+   Return ``0`` on success.
+   Return ``-1`` with an exception set on error.
+
    .. versionadded:: 3.5
 
 .. c:function:: int PyUnstable_Module_SetGIL(PyObject *module, void *gil)