[Python-checkins] cpython (2.7): Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets

stefan.krah python-checkins at python.org
Sun Feb 1 19:51:07 CET 2015


https://hg.python.org/cpython/rev/c4c1d68b6301
changeset: 94431:c4c1d68b6301
branch: 2.7
parent: 94428:209776d49a9a
user: Stefan Krah <skrah at bytereef.org>
date: Sun Feb 01 19:40:50 2015 +0100
summary:
 Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets
are required.
files:
 Doc/c-api/buffer.rst | 5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -98,8 +98,11 @@
 suboffset value that it negative 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). 
+
 Here is a function that returns a pointer to the element in an N-D array
- pointed to by an N-dimesional index when there are both non-NULL strides
+ pointed to by an N-dimensional index when there are both non-NULL strides
 and suboffsets::
 
 void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /