There was an error while loading. Please reload this page.
1 parent f8d4cc7 commit bd26a44Copy full SHA for bd26a44
1 file changed
Doc/c-api/buffer.rst
@@ -355,8 +355,10 @@ If :c:member:`~Py_buffer.strides` is *NULL*, the array is interpreted as
355
a standard n-dimensional C-array. Otherwise, the consumer must access an
356
n-dimensional array as follows:
357
358
- ``ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1]``
359
- ``item = *((typeof(item) *)ptr);``
+.. code-block:: c
+
360
+ ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * strides[n-1];
361
+ item = *((typeof(item) *)ptr);
362
363
364
As noted above, :c:member:`~Py_buffer.buf` can point to any location within
0 commit comments