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/exceptions.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/exceptions.rst')
-rw-r--r-- | Doc/c-api/exceptions.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index ad75ec5..37c938a 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -14,7 +14,7 @@ there is a global indicator (per thread) of the last error that occurred. Most C API functions don't clear this on success, but will set it to indicate the cause of the error on failure. Most C API functions also return an error indicator, usually ``NULL`` if they are supposed to return a pointer, or ``-1`` -if they return an integer (exception: the :c:func:`PyArg_\*` functions +if they return an integer (exception: the ``PyArg_*`` functions return ``1`` for success and ``0`` for failure). Concretely, the error indicator consists of three object pointers: the @@ -370,7 +370,7 @@ Querying the error indicator .. c:function:: PyObject* PyErr_Occurred() Test whether the error indicator is set. If set, return the exception *type* - (the first argument to the last call to one of the :c:func:`PyErr_Set\*` + (the first argument to the last call to one of the ``PyErr_Set*`` functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You do not own a reference to the return value, so you do not need to :c:func:`Py_DECREF` it. |