Skip to content

Commit bd26a44

Browse files
madphysicisttaleinat
authored andcommitted
Docs: Correct formatting of a multiline code block (GH-13806)
1 parent f8d4cc7 commit bd26a44

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/c-api/buffer.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,10 @@ If :c:member:`~Py_buffer.strides` is *NULL*, the array is interpreted as
355355
a standard n-dimensional C-array. Otherwise, the consumer must access an
356356
n-dimensional array as follows:
357357

358-
``ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1]``
359-
``item = *((typeof(item) *)ptr);``
358+
.. code-block:: c
359+
360+
ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1];
361+
item = *((typeof(item) *)ptr);
360362
361363
362364
As noted above, :c:member:`~Py_buffer.buf` can point to any location within

0 commit comments

Comments
 (0)