[issue21778] PyBuffer_FillInfo() from 3.3
Stefan Krah
report at bugs.python.org
Mon Jun 16 16:29:48 CEST 2014
Stefan Krah added the comment:
The flags from mb_getbuf() have to be passed to PyBuffer_FillInfo():
return PyBuffer_FillInfo(view, (PyObject *)self,
internal, 5,
/*readonly=*/0, flags);
The flags contain the actual request that the consumer
sends to the buffer provider, so they cannot be hardcoded.
In this example, memoryview sends the PyBUF_FULL request to
mb_getbuf(). If the request is successful, it can assume
non-NULL strides.
Should the documentation be improved?
----------
nosy: +skrah
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21778>
_______________________________________
More information about the Python-bugs-list
mailing list