gh-115172: Fix explicit index extries for the C API (GH-115173) · python/cpython@573acb3 · GitHub
Skip to content

Commit 573acb3

Browse files
gh-115172: Fix explicit index extries for the C API (GH-115173)
1 parent 4a08e7b commit 573acb3

14 files changed

Lines changed: 150 additions & 153 deletions

File tree

Doc/c-api/buffer.rst

Lines changed: 1 addition & 1 deletion

Doc/c-api/code.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bound into a function.
4949
.. versionchanged:: 3.11
5050
Added ``qualname`` and ``exceptiontable`` parameters.
5151
52-
.. index:: single: PyCode_New
52+
.. index:: single: PyCode_New (C function)
5353
5454
.. versionchanged:: 3.12
5555
@@ -62,7 +62,7 @@ bound into a function.
6262
Similar to :c:func:`PyUnstable_Code_New`, but with an extra "posonlyargcount" for positional-only arguments.
6363
The same caveats that apply to ``PyUnstable_Code_New`` also apply to this function.
6464
65-
.. index:: single: PyCode_NewWithPosOnlyArgs
65+
.. index:: single: PyCode_NewWithPosOnlyArgs (C function)
6666
6767
.. versionadded:: 3.8 as ``PyCode_NewWithPosOnlyArgs``
6868
@@ -221,7 +221,7 @@ may change without deprecation warnings.
221221
*free* will be called on non-``NULL`` data stored under the new index.
222222
Use :c:func:`Py_DecRef` when storing :c:type:`PyObject`.
223223
224-
.. index:: single: _PyEval_RequestCodeExtraIndex
224+
.. index:: single: _PyEval_RequestCodeExtraIndex (C function)
225225
226226
.. versionadded:: 3.6 as ``_PyEval_RequestCodeExtraIndex``
227227
@@ -239,7 +239,7 @@ may change without deprecation warnings.
239239
If no data was set under the index, set *extra* to ``NULL`` and return
240240
0 without setting an exception.
241241
242-
.. index:: single: _PyCode_GetExtra
242+
.. index:: single: _PyCode_GetExtra (C function)
243243
244244
.. versionadded:: 3.6 as ``_PyCode_GetExtra``
245245
@@ -254,7 +254,7 @@ may change without deprecation warnings.
254254
Set the extra data stored under the given index to *extra*.
255255
Return 0 on success. Set an exception and return -1 on failure.
256256
257-
.. index:: single: _PyCode_SetExtra
257+
.. index:: single: _PyCode_SetExtra (C function)
258258
259259
.. versionadded:: 3.6 as ``_PyCode_SetExtra``
260260

Doc/c-api/exceptions.rst

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ For convenience, some of these functions will always return a
180180
181181
.. c:function:: PyObject* PyErr_SetFromErrno(PyObject *type)
182182
183-
.. index:: single: strerror()
183+
.. index:: single: strerror (C function)
184184
185185
This is a convenience function to raise an exception when a C library function
186186
has returned an error and set the C variable :c:data:`errno`. It constructs a
@@ -635,7 +635,7 @@ Signal Handling
635635
636636
.. index::
637637
pair: module; signal
638-
single: SIGINT
638+
single: SIGINT (C macro)
639639
single: KeyboardInterrupt (built-in exception)
640640
641641
This function interacts with Python's signal handling.
@@ -666,7 +666,7 @@ Signal Handling
666666
667667
.. index::
668668
pair: module; signal
669-
single: SIGINT
669+
single: SIGINT (C macro)
670670
single: KeyboardInterrupt (built-in exception)
671671
672672
Simulate the effect of a :c:macro:`!SIGINT` signal arriving.
@@ -968,59 +968,59 @@ All standard Python exceptions are available as global variables whose names are
968968
the variables:
969969
970970
.. index::
971-
single: PyExc_BaseException
972-
single: PyExc_Exception
973-
single: PyExc_ArithmeticError
974-
single: PyExc_AssertionError
975-
single: PyExc_AttributeError
976-
single: PyExc_BlockingIOError
977-
single: PyExc_BrokenPipeError
978-
single: PyExc_BufferError
979-
single: PyExc_ChildProcessError
980-
single: PyExc_ConnectionAbortedError
981-
single: PyExc_ConnectionError
982-
single: PyExc_ConnectionRefusedError
983-
single: PyExc_ConnectionResetError
984-
single: PyExc_EOFError
985-
single: PyExc_FileExistsError
986-
single: PyExc_FileNotFoundError
987-
single: PyExc_FloatingPointError
988-
single: PyExc_GeneratorExit
989-
single: PyExc_ImportError
990-
single: PyExc_IndentationError
991-
single: PyExc_IndexError
992-
single: PyExc_InterruptedError
993-
single: PyExc_IsADirectoryError
994-
single: PyExc_KeyError
995-
single: PyExc_KeyboardInterrupt
996-
single: PyExc_LookupError
997-
single: PyExc_MemoryError
998-
single: PyExc_ModuleNotFoundError
999-
single: PyExc_NameError
1000-
single: PyExc_NotADirectoryError
1001-
single: PyExc_NotImplementedError
1002-
single: PyExc_OSError
1003-
single: PyExc_OverflowError
1004-
single: PyExc_PermissionError
1005-
single: PyExc_ProcessLookupError
1006-
single: PyExc_RecursionError
1007-
single: PyExc_ReferenceError
1008-
single: PyExc_RuntimeError
1009-
single: PyExc_StopAsyncIteration
1010-
single: PyExc_StopIteration
1011-
single: PyExc_SyntaxError
1012-
single: PyExc_SystemError
1013-
single: PyExc_SystemExit
1014-
single: PyExc_TabError
1015-
single: PyExc_TimeoutError
1016-
single: PyExc_TypeError
1017-
single: PyExc_UnboundLocalError
1018-
single: PyExc_UnicodeDecodeError
1019-
single: PyExc_UnicodeEncodeError
1020-
single: PyExc_UnicodeError
1021-
single: PyExc_UnicodeTranslateError
1022-
single: PyExc_ValueError
1023-
single: PyExc_ZeroDivisionError
971+
single: PyExc_BaseException (C var)
972+
single: PyExc_Exception (C var)
973+
single: PyExc_ArithmeticError (C var)
974+
single: PyExc_AssertionError (C var)
975+
single: PyExc_AttributeError (C var)
976+
single: PyExc_BlockingIOError (C var)
977+
single: PyExc_BrokenPipeError (C var)
978+
single: PyExc_BufferError (C var)
979+
single: PyExc_ChildProcessError (C var)
980+
single: PyExc_ConnectionAbortedError (C var)
981+
single: PyExc_ConnectionError (C var)
982+
single: PyExc_ConnectionRefusedError (C var)
983+
single: PyExc_ConnectionResetError (C var)
984+
single: PyExc_EOFError (C var)
985+
single: PyExc_FileExistsError (C var)
986+
single: PyExc_FileNotFoundError (C var)
987+
single: PyExc_FloatingPointError (C var)
988+
single: PyExc_GeneratorExit (C var)
989+
single: PyExc_ImportError (C var)
990+
single: PyExc_IndentationError (C var)
991+
single: PyExc_IndexError (C var)
992+
single: PyExc_InterruptedError (C var)
993+
single: PyExc_IsADirectoryError (C var)
994+
single: PyExc_KeyError (C var)
995+
single: PyExc_KeyboardInterrupt (C var)
996+
single: PyExc_LookupError (C var)
997+
single: PyExc_MemoryError (C var)
998+
single: PyExc_ModuleNotFoundError (C var)
999+
single: PyExc_NameError (C var)
1000+
single: PyExc_NotADirectoryError (C var)
1001+
single: PyExc_NotImplementedError (C var)
1002+
single: PyExc_OSError (C var)
1003+
single: PyExc_OverflowError (C var)
1004+
single: PyExc_PermissionError (C var)
1005+
single: PyExc_ProcessLookupError (C var)
1006+
single: PyExc_RecursionError (C var)
1007+
single: PyExc_ReferenceError (C var)
1008+
single: PyExc_RuntimeError (C var)
1009+
single: PyExc_StopAsyncIteration (C var)
1010+
single: PyExc_StopIteration (C var)
1011+
single: PyExc_SyntaxError (C var)
1012+
single: PyExc_SystemError (C var)
1013+
single: PyExc_SystemExit (C var)
1014+
single: PyExc_TabError (C var)
1015+
single: PyExc_TimeoutError (C var)
1016+
single: PyExc_TypeError (C var)
1017+
single: PyExc_UnboundLocalError (C var)
1018+
single: PyExc_UnicodeDecodeError (C var)
1019+
single: PyExc_UnicodeEncodeError (C var)
1020+
single: PyExc_UnicodeError (C var)
1021+
single: PyExc_UnicodeTranslateError (C var)
1022+
single: PyExc_ValueError (C var)
1023+
single: PyExc_ZeroDivisionError (C var)
10241024
10251025
+-----------------------------------------+---------------------------------+----------+
10261026
| C Name | Python Name | Notes |
@@ -1151,9 +1151,9 @@ the variables:
11511151
These are compatibility aliases to :c:data:`PyExc_OSError`:
11521152
11531153
.. index::
1154-
single: PyExc_EnvironmentError
1155-
single: PyExc_IOError
1156-
single: PyExc_WindowsError
1154+
single: PyExc_EnvironmentError (C var)
1155+
single: PyExc_IOError (C var)
1156+
single: PyExc_WindowsError (C var)
11571157
11581158
+-------------------------------------+----------+
11591159
| C Name | Notes |
@@ -1188,17 +1188,17 @@ names are ``PyExc_`` followed by the Python exception name. These have the type
11881188
the variables:
11891189
11901190
.. index::
1191-
single: PyExc_Warning
1192-
single: PyExc_BytesWarning
1193-
single: PyExc_DeprecationWarning
1194-
single: PyExc_FutureWarning
1195-
single: PyExc_ImportWarning
1196-
single: PyExc_PendingDeprecationWarning
1197-
single: PyExc_ResourceWarning
1198-
single: PyExc_RuntimeWarning
1199-
single: PyExc_SyntaxWarning
1200-
single: PyExc_UnicodeWarning
1201-
single: PyExc_UserWarning
1191+
single: PyExc_Warning (C var)
1192+
single: PyExc_BytesWarning (C var)
1193+
single: PyExc_DeprecationWarning (C var)
1194+
single: PyExc_FutureWarning (C var)
1195+
single: PyExc_ImportWarning (C var)
1196+
single: PyExc_PendingDeprecationWarning (C var)
1197+
single: PyExc_ResourceWarning (C var)
1198+
single: PyExc_RuntimeWarning (C var)
1199+
single: PyExc_SyntaxWarning (C var)
1200+
single: PyExc_UnicodeWarning (C var)
1201+
single: PyExc_UserWarning (C var)
12021202
12031203
+------------------------------------------+---------------------------------+----------+
12041204
| C Name | Python Name | Notes |

Doc/c-api/file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ the :mod:`io` APIs instead.
9696
9797
.. c:function:: int PyFile_WriteObject(PyObject *obj, PyObject *p, int flags)
9898
99-
.. index:: single: Py_PRINT_RAW
99+
.. index:: single: Py_PRINT_RAW (C macro)
100100
101101
Write object *obj* to file object *p*. The only supported flag for *flags* is
102102
:c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written

Doc/c-api/init.rst

Lines changed: 11 additions & 14 deletions

0 commit comments

Comments
 (0)