8000 Docs: Correct formatting of a multiline code block (GH-13806) · python/cpython@ba3c89f · GitHub
[go: up one dir, main page]

Skip to content

Commit ba3c89f

Browse files
Docs: Correct formatting of a multiline code block (GH-13806)
(cherry picked from commit bd26a44) Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
1 parent efd23a1 commit ba3c89f

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)
0