# HG changeset patch # Parent a2df4baa112ba329f4a05c47812df22f40068ea2 diff -r a2df4baa112b Doc/c-api/buffer.rst --- a/Doc/c-api/buffer.rst Wed Apr 01 13:06:18 2015 +0300 +++ b/Doc/c-api/buffer.rst Fri Apr 03 01:52:31 2015 +0000 @@ -285,7 +285,12 @@ ~~~~~~~~~~~~~~~~~~~ C or Fortran contiguity can be explicitly requested, with and without stride -information. Without stride information, the buffer must be C-contiguous. +information. Without stride information, the buffer must be C-contiguous, +meaning that its memory layout must be like an array in C. Zero-dimensional +buffers are considered C-contiguous. Multi-dimensional buffers are considered +C-contiguous if they are layed out as an array of sub-arrays, if indexes in +the first dimension apply to the outer array, and the sub-arrays are also +C-contiguous. .. tabularcolumns:: |p{0.35\linewidth}|l|l|l|l| diff -r a2df4baa112b Doc/glossary.rst --- a/Doc/glossary.rst Wed Apr 01 13:06:18 2015 +0300 +++ b/Doc/glossary.rst Fri Apr 03 01:52:31 2015 +0000 @@ -86,8 +86,10 @@ A :term:`text file` reads and writes :class:`str` objects. bytes-like object - An object that supports the :ref:`bufferobjects`, like :class:`bytes`, - :class:`bytearray` or :class:`memoryview`. Bytes-like objects can + An object that supports the :ref:`bufferobjects` and can + export a C-contiguous buffer. This includes all :class:`bytes`, + :class:`bytearray`, and :class:`array.array` objects, as well as many + common :class:`memoryview` objects. Bytes-like objects can be used for various operations that expect binary data, such as compression, saving to a binary file or sending over a socket. Some operations need the binary data to be mutable, in which case