[Python-checkins] Docs: Correct formatting of a multiline code block (GH-13806)
Tal Einat
webhook-mailer at python.org
Wed Jul 17 04:13:09 EDT 2019
https://github.com/python/cpython/commit/bd26a4466b507e196fc9a5e4a6cb7cd6d39f85aa
commit: bd26a4466b507e196fc9a5e4a6cb7cd6d39f85aa
branch: master
author: Joseph Fox-Rabinovitz <madphysicist at users.noreply.github.com>
committer: Tal Einat <taleinat at gmail.com>
date: 2019-07-17T11:13:01+03:00
summary:
Docs: Correct formatting of a multiline code block (GH-13806)
files:
M Doc/c-api/buffer.rst
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 72d965053cfd..7553efc2cfbc 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
More information about the Python-checkins
mailing list