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

Nick Coghlan report at bugs.python.org
Wed Jul 6 06:16:49 CEST 2011


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

Oops, Antoine's right, the release() semantics in the patch are broken, albeit for the precisely opposite reasons: that example will actually blow up with BufferError inside some_library_function().

I withdraw my objection - Antoine's right that release() on a memoryview object has to just mean "drop the reference to the ManagedBuffer instance". Calling release() when there are actual *exported* buffers outstanding should still trigger BufferError though (slices and copies don't count in that case, as they'll have their own independent references to the ManagedBuffer instance).

----------

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


More information about the Python-bugs-list mailing list