Skip to content

Commit

Permalink
Docs: Correct formatting of a multiline code block (pythonGH-13806)
Browse files Browse the repository at this point in the history
  • Loading branch information
madphysicist authored and taleinat committed Jul 17, 2019
1 parent f8d4cc7 commit bd26a44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Doc/c-api/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,10 @@ If :c:member:`~Py_buffer.strides` is *NULL*, the array is interpreted as
a standard n-dimensional C-array. Otherwise, the consumer must access an
n-dimensional array as follows:

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

0 comments on commit bd26a44

Please sign in to comment.