From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 17 Jul 2019 08:32:58 +0000 (-0700) Subject: Docs: Correct formatting of a multiline code block (GH-13806) X-Git-Tag: v3.7.5rc1~242 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba3c89f42e3935924a4a9a3278cee994f5bb7aee;p=thirdparty%2FPython%2Fcpython.git Docs: Correct formatting of a multiline code block (GH-13806) (cherry picked from commit bd26a4466b507e196fc9a5e4a6cb7cd6d39f85aa) Co-authored-by: Joseph Fox-Rabinovitz --- diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index c7c1e3cc745a..1d4ac457e54c 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -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