Message232946
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. |
|
Date |
User |
Action |
Args |
2014-12-19 20:36:29 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, belopolsky, pitrou, larry, Arfrever, skrah |
2014-12-19 20:36:29 | serhiy.storchaka | set | messageid: <1419021389.49.0.420602058384.issue22896@psf.upfronthosting.co.za> |
2014-12-19 20:36:29 | serhiy.storchaka | link | issue22896 messages |
2014-12-19 20:36:29 | serhiy.storchaka | create | |
|