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

Nick Coghlan report at bugs.python.org
Wed Nov 3 13:51:52 CET 2010


Nick Coghlan <ncoghlan at gmail.com> added the comment:

It doesn't help that neither PEP 3118 nor the Py_buffer docs mention the "obj" member of the Py_buffer struct that refers back to the original object providing the buffer - that's fairly fundamental to understanding how PyBuffer_Release and PyMemoryView_FromBuffer can work even in theory.

(Given that, an additional _PyManagedBuffer object shouldn't be necessary - MemoryView just needs to call ReleaseBuffer and GetBuffer at the appropriate times)

----------

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


More information about the Python-bugs-list mailing list