From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 25 Dec 2023 18:24:22 +0000 (+0100) Subject: [3.12] docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888... X-Git-Tag: v3.12.2~264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78ccb41c568c7a84ec1a038a297ef4bd3f042d49;p=thirdparty%2FPython%2Fcpython.git [3.12] docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888) (GH-111690) (cherry picked from commit 9f33ede12710c454643c394421f52d209247272c) Co-authored-by: lefp <70862148+lefp@users.noreply.github.com> --- diff --git a/Doc/c-api/bytes.rst b/Doc/c-api/bytes.rst index 61a68f527738..4790d3b2da43 100644 --- a/Doc/c-api/bytes.rst +++ b/Doc/c-api/bytes.rst @@ -155,6 +155,7 @@ called with a non-bytes parameter. Return the null-terminated contents of the object *obj* through the output variables *buffer* and *length*. + Returns ``0`` on success. If *length* is ``NULL``, the bytes object may not contain embedded null bytes;