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

Antoine Pitrou report at bugs.python.org
Fri Oct 1 20:53:43 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Here is a patch that fixes the issue. Can you try it?

Unfortunately, more advanced uses such a slicing the memoryview are still crashing. That's because the new buffer protocol doesn't define ownership of Py_buffer structs. As a result, nothing can be assumed at to which piece of code is responsible for allocation and deallocation of related memory areas (such as shapes and strides arrays).

----------
keywords: +patch
nosy: +ncoghlan, teoliphant
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19088/memview.patch

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


More information about the Python-bugs-list mailing list