mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Docs: Correct formatting of a multiline code block (GH-13806)
This commit is contained in:
parent
f8d4cc7dbb
commit
bd26a4466b
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue