New submission from Stefan Krah: The call to PyBuffer_IsContiguous() (see patch) is redundant:
PyBUF_WRITABLE is a flag that can be added to any buffer request. The real request here is (PyBUF_SIMPLE|PyBUF_WRITABLE), which is equal to PyBUF_WRITABLE since PyBUF_SIMPLE==0. PyBUF_SIMPLE implies C-contiguous with format 'B'. Perhaps the check was added for broken buffer providers, but I think at some point we should assume correct providers. ---------- keywords: +patch nosy: +larry Added file: http://bugs.python.org/file37976/issue23376.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23376> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com