[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

Stefan Krah report at bugs.python.org
Fri Jul 20 14:24:03 CEST 2012


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

The fix would require all of these functions from memoryview.c (3.3):

last_dim_is_contiguous
cmp_structure
copy_base
copy_rec
copy_buffer


How to avoid code duplication? I could move them into abstract.c,
but conceptually they're really just low level buffer interface
functions. Also, they make a lot of assumptions (ndim >= 1,
PyBUF_FULL) that are a little dangerous for a general interface.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12834>
_______________________________________


More information about the Python-bugs-list mailing list