diff --git a/Doc/c-api/bool.rst b/Doc/c-api/bool.rst index b2d8f2124fc203..a0c6bca2c4c365 100644 --- a/Doc/c-api/bool.rst +++ b/Doc/c-api/bool.rst @@ -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. diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 6e5443f0d6cdc5..a3bd37f3840111 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -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 diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 4d81b273638b14..5d39fc6a9c0bd1 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -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 diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index 4f6ac0d8175c6b..43d0196fd61f5b 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -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. @@ -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. diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst index 2aa43318e7a455..3bbab514df7052 100644 --- a/Doc/c-api/memoryview.rst +++ b/Doc/c-api/memoryview.rst @@ -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 diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index ad1d5edb901dc5..603c4b39db6123 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -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)