@@ -163,13 +163,6 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
163163 and :c:member: `~Py_buffer.suboffsets ` MUST be ``NULL ``.
164164 The maximum number of dimensions is given by :c:macro: `PyBUF_MAX_NDIM `.
165165
166- .. :c:macro:: PyBUF_MAX_NDIM
167-
168- The maximum number of dimensions the memory represents.
169- Exporters MUST respect this limit, consumers of multi-dimensional
170- buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.
171- Currently set to 64.
172-
173166 .. c :member :: Py_ssize_t *shape
174167
175168 An array of :c:type: `Py_ssize_t ` of length :c:member: `~Py_buffer.ndim `
@@ -221,6 +214,17 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
221214 freed when the buffer is released. The consumer MUST NOT alter this
222215 value.
223216
217+
218+ Constants:
219+
220+ .. c :macro :: PyBUF_MAX_NDIM
221+
222+ The maximum number of dimensions the memory represents.
223+ Exporters MUST respect this limit, consumers of multi-dimensional
224+ buffers SHOULD be able to handle up to :c:macro: `!PyBUF_MAX_NDIM ` dimensions.
225+ Currently set to 64.
226+
227+
224228.. _buffer-request-types :
225229
226230Buffer request types
@@ -444,7 +448,7 @@ Buffer-related functions
444448
445449 Send a request to *exporter * to fill in *view * as specified by *flags *.
446450 If the exporter cannot provide a buffer of the exact type, it MUST raise
447- :c:data: ` PyExc_BufferError `, set ``view->obj `` to ``NULL `` and
451+ :exc: ` BufferError `, set ``view->obj `` to ``NULL `` and
448452 return ``-1 ``.
449453
450454 On success, fill in *view *, set ``view->obj `` to a new reference
@@ -531,7 +535,7 @@ Buffer-related functions
531535 and :c:macro: `PyBUF_WRITABLE ` is set in *flags *.
532536
533537 On success, set ``view->obj `` to a new reference to *exporter * and
534- return 0. Otherwise, raise :c:data: ` PyExc_BufferError `, set
538+ return 0. Otherwise, raise :exc: ` BufferError `, set
535539 ``view->obj `` to ``NULL `` and return ``-1 ``;
536540
537541 If this function is used as part of a :ref: `getbufferproc <buffer-structs >`,
0 commit comments