This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, belopolsky, larry, pitrou, serhiy.storchaka, skrah
Date 2014-12-19.20:36:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419021389.49.0.420602058384.issue22896@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, there is a way to create non-contiguous buffers.

>>> b = bytes(range(16))
>>> m = memoryview(b)
>>> m[::2].c_contiguous
False

> PyBUF_SIMPLE enforces contiguity.

Then contiguousity check in getbuffer() in Python/getargs.c is redundant. And in most cases the use of _PyBuffer_Converter() and PyObject_GetBuffer() could be replaced by the use of "y*" and "w*" format units.
History
Date User Action Args
2014-12-19 20:36:29serhiy.storchakasetrecipients: + serhiy.storchaka, belopolsky, pitrou, larry, Arfrever, skrah
2014-12-19 20:36:29serhiy.storchakasetmessageid: <1419021389.49.0.420602058384.issue22896@psf.upfronthosting.co.za>
2014-12-19 20:36:29serhiy.storchakalinkissue22896 messages
2014-12-19 20:36:29serhiy.storchakacreate