From: Stefan Krah Date: Sun, 1 Feb 2015 18:42:12 +0000 (+0100) Subject: Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets X-Git-Tag: v3.4.3rc1~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0dc4e153a2dee0d8e4ea06f8d2cf8de7c89cb7d5;p=python Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets are required. --- diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst index 230c6a957f..9cfd152822 100644 --- a/Doc/c-api/buffer.rst +++ b/Doc/c-api/buffer.rst @@ -198,6 +198,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`. indicates that no de-referencing should occur (striding in a contiguous memory block). + If all suboffsets are negative (i.e. no de-referencing is needed, then + this field must be NULL (the default value). + This type of array representation is used by the Python Imaging Library (PIL). See `complex arrays`_ for further information how to access elements of such an array.