Skip to content

Commit 0dc4e15

Browse files
committed
Issue python#23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets
are required.
1 parent 7213fcc commit 0dc4e15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/c-api/buffer.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
198198
indicates that no de-referencing should occur (striding in a contiguous
199199
memory block).
200200

201+
If all suboffsets are negative (i.e. no de-referencing is needed, then
202+
this field must be NULL (the default value).
203+
201204
This type of array representation is used by the Python Imaging Library
202205
(PIL). See `complex arrays`_ for further information how to access elements
203206
of such an array.

0 commit comments

Comments
 (0)