[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1

Lenard Lindstrom report at bugs.python.org
Tue Feb 8 01:15:50 CET 2011


Lenard Lindstrom <len-l at telus.net> added the comment:

I think only a simple solution is needed. From my experience adding the 
new buffer protocol to pygame.mixer.Sound it would be easy enough for 
bf_releasebuffer to use the "internal" field to free memory allocated by 
bf_getbuffer. As long as this pointer is preserved it would not matter 
if Py_buffer is copied or the "shape" and "strides" pointers change. 
Just ensure Py_buffer is clearly documented.

----------

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


More information about the Python-bugs-list mailing list