diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-05 18:00:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 18:00:50 (GMT) |
commit | b39182e4b0c476de3f2465b1af71e46a334ac9d5 (patch) | |
tree | dd4feae63fa5cf4cf21df399234885f6d709678e /Doc/c-api/arg.rst | |
parent | de0a656d5b52c6ad54a04ec825380c4dc422e736 (diff) | |
download | cpython-b39182e4b0c476de3f2465b1af71e46a334ac9d5.zip cpython-b39182e4b0c476de3f2465b1af71e46a334ac9d5.tar.gz cpython-b39182e4b0c476de3f2465b1af71e46a334ac9d5.tar.bz2 |
[3.10] gh-93738: Documentation C syntax (Function glob patterns -> literal markup) (GH-97774) (#97911)
(cherry picked from commit 0e72606dd4cf3023a4f8c2fe3c58082592b253f7)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Doc/c-api/arg.rst')
-rw-r--r-- | Doc/c-api/arg.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst index fb921a4..91d764c 100644 --- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -335,7 +335,7 @@ Other objects status = converter(object, address); where *object* is the Python object to be converted and *address* is the - :c:type:`void*` argument that was passed to the :c:func:`PyArg_Parse\*` function. + :c:type:`void*` argument that was passed to the ``PyArg_Parse*`` function. The returned *status* should be ``1`` for a successful conversion and ``0`` if the conversion has failed. When the conversion fails, the *converter* function should raise an exception and leave the content of *address* unmodified. @@ -409,9 +409,9 @@ what is specified for the corresponding format unit in that case. For the conversion to succeed, the *arg* object must match the format and the format must be exhausted. On success, the -:c:func:`PyArg_Parse\*` functions return true, otherwise they return +``PyArg_Parse*`` functions return true, otherwise they return false and raise an appropriate exception. When the -:c:func:`PyArg_Parse\*` functions fail due to conversion failure in one +``PyArg_Parse*`` functions fail due to conversion failure in one of the format units, the variables at the addresses corresponding to that and the following format units are left untouched. @@ -518,7 +518,7 @@ Building values .. c:function:: PyObject* Py_BuildValue(const char *format, ...) Create a new value based on a format string similar to those accepted by the - :c:func:`PyArg_Parse\*` family of functions and a sequence of values. Returns + ``PyArg_Parse*`` family of functions and a sequence of values. Returns the value or ``NULL`` in the case of an error; an exception will be raised if ``NULL`` is returned. |