Skip to content

gh-107298: Fix references to undocumented APIs #107304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/bool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ are available, however.

.. c:function:: int PyBool_Check(PyObject *o)

Return true if *o* is of type :c:data:`PyBool_Type`. This function always
Return true if *o* is of type :c:data:`!PyBool_Type`. This function always
succeeds.


Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides`
and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``.

The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions
The macro :c:macro:`!PyBUF_MAX_NDIM` limits the maximum number of dimensions
to 64. Exporters MUST respect this limit, consumers of multi-dimensional
buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions.
buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.

.. c:member:: Py_ssize_t *shape

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ an error value).
.. c:function:: int PyErr_ResourceWarning(PyObject *source, Py_ssize_t stack_level, const char *format, ...)

Function similar to :c:func:`PyErr_WarnFormat`, but *category* is
:exc:`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`.
:exc:`ResourceWarning` and it passes *source* to :func:`!warnings.WarningMessage`.

.. versionadded:: 3.6

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Pack functions
The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an
:c:expr:`int` argument, non-zero if you want the bytes string in little-endian
format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you
want big-endian format (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN`
want big-endian format (exponent first, at *p*). The :c:macro:`!PY_BIG_ENDIAN`
constant can be used to use the native endian: it is equal to ``1`` on big
endian processor, or ``0`` on little endian processor.

Expand Down Expand Up @@ -140,7 +140,7 @@ Unpack functions
The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an
:c:expr:`int` argument, non-zero if the bytes string is in little-endian format
(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-endian
(exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can be used to
(exponent first, at *p*). The :c:macro:`!PY_BIG_ENDIAN` constant can be used to
use the native endian: it is equal to ``1`` on big endian processor, or ``0``
on little endian processor.

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/memoryview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ any other object.
.. c:function:: PyObject *PyMemoryView_FromMemory(char *mem, Py_ssize_t size, int flags)

Create a memoryview object using *mem* as the underlying buffer.
*flags* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`.
*flags* can be one of :c:macro:`!PyBUF_READ` or :c:macro:`!PyBUF_WRITE`.

.. versionadded:: 3.3

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,8 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
* :c:data:`Py_True` or :c:data:`Py_False` for successful comparisons
* :c:data:`Py_NotImplemented` in case the type combination is unknown

Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:`Py_EQ`,
:c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`.
Possible values for *op* are :c:macro:`!Py_GT`, :c:macro:`!Py_GE`, :c:macro:`!Py_EQ`,
:c:macro:`!Py_NE`, :c:macro:`!Py_LT`, and :c:macro:`!Py_LE`.


.. c:function:: PyObject* PyUnicode_Format(PyObject *format, PyObject *args)
Expand Down