[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

Stefan Krah report at bugs.python.org
Tue Jul 5 13:44:54 CEST 2011


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

I'm slightly confused about the implication chain in the flags. PyBUF_STRIDES 
seem to allow for discontiguous arrays, yet STRIDES -> ND -> C_CONTIGUOUS.



                                 PyBUF_FULL[_RO]
                                       |
    PyBUF_INDIRECT -------------- PyBUF_FORMAT ----------[PyBUF_WRITABLE]         
          |
    PyBUF_STRIDES (This would be used when the consumer can handle strided, discontiguous arrays ...)
          |
      PyBUF_ND  <-> PyBUF_CONTIG (why?) 
          |
  PyBUF_C_CONTIGUOUS (... but the implication chain leads us to a contiguous buffer)

----------

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


More information about the Python-bugs-list mailing list