]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Document PyBUF_MAX_NDIM (#107865)
authorErlend E. Aasland <erlend@python.org>
Fri, 11 Aug 2023 16:03:53 +0000 (18:03 +0200)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2023 16:03:53 +0000 (18:03 +0200)
Doc/c-api/buffer.rst

index 8ca1c190dab9a991c550c94c18da76ff75d6653f..ba391a5279f205bf2e2a393bf9bb480360add15c 100644 (file)
@@ -161,10 +161,14 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
       If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing
       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 maximum number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`.
 
-      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.
+   .. :c:macro:: PyBUF_MAX_NDIM
+
+      The maximum number of dimensions the memory represents.
+      Exporters MUST respect this limit, consumers of multi-dimensional
+      buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.
+      Currently set to 64.
 
    .. c:member:: Py_ssize_t *shape