summaryrefslogtreecommitdiff
path: root/Doc/c-api/buffer.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
committerBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
commit5a991226e84e935f2a50deec664eaf3860893354 (patch)
treee674175fd5bc642be83ceb674d57e303b26f4326 /Doc/c-api/buffer.rst
parent9997d0207649b71b5862d3c036c1f7dcacf4f7b1 (diff)
parent1ccde8e1ad13ea6943f6ef5ea4329c9827ba493e (diff)
downloadcpython-5a991226e84e935f2a50deec664eaf3860893354.tar.gz
merge 3.4
Diffstat (limited to 'Doc/c-api/buffer.rst')
-rw-r--r--Doc/c-api/buffer.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 7361099123..45c94887ed 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -96,8 +96,8 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
block of the exporter. For example, with negative :c:member:`~Py_buffer.strides`
the value may point to the end of the memory block.
- For contiguous arrays, the value points to the beginning of the memory
- block.
+ For :term:`contiguous` arrays, the value points to the beginning of
+ the memory block.
.. c:member:: void \*obj
@@ -281,11 +281,14 @@ of the flags below it.
+-----------------------------+-------+---------+------------+
+.. index:: contiguous, C-contiguous, Fortran contiguous
+
contiguity requests
~~~~~~~~~~~~~~~~~~~
-C or Fortran contiguity can be explicitly requested, with and without stride
-information. Without stride information, the buffer must be C-contiguous.
+C or Fortran :term:`contiguity <contiguous>` can be explicitly requested,
+with and without stride information. Without stride information, the buffer
+must be C-contiguous.
.. tabularcolumns:: |p{0.35\linewidth}|l|l|l|l|
@@ -466,13 +469,13 @@ Buffer-related functions
.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)
Return 1 if the memory defined by the *view* is C-style (*order* is
- ``'C'``) or Fortran-style (*order* is ``'F'``) contiguous or either one
+ ``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one
(*order* is ``'A'``). Return 0 otherwise.
.. c:function:: void PyBuffer_FillContiguousStrides(int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t itemsize, char order)
- Fill the *strides* array with byte-strides of a contiguous (C-style if
+ Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style if
*order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the
given shape with the given number of bytes per element.