]> granicus.if.org Git - python/commitdiff
Docs: Correct formatting of a multiline code block (GH-13806)
authorJoseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
Wed, 17 Jul 2019 08:13:01 +0000 (03:13 -0500)
committerTal Einat <taleinat@gmail.com>
Wed, 17 Jul 2019 08:13:01 +0000 (11:13 +0300)
Doc/c-api/buffer.rst

index 72d965053cfda3be01b392863f701f492b93daba..7553efc2cfbc1e0d19c458acd312eb321f1d9e7b 100644 (file)
@@ -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