[issue10181] get_shape0 in memoryobject.c not checked for error return

Antoine Pitrou report at bugs.python.org
Wed Nov 3 00:01:14 CET 2010


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

> Read the "Releasing the buffer" section in PEP 3118 again. Unless I'm
> misunderstanding you completely, the rules you're asking for are
> already in place: those fields are entirely the responsibility of the
> exporting object, and it needs to ensure they remain valid until the
> buffer is released.

In practice, though, we copy Py_buffer structs around and there's no way
for the original object to know about that. That's the fundamental
difference with a PyObject where you would only increase a refcount
instead of copying the structure's contents.

----------

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


More information about the Python-bugs-list mailing list