[docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression)

Stefan Krah report at bugs.python.org
Fri Aug 31 21:12:12 CEST 2012


Stefan Krah added the comment:

Alexander Belopolsky <report at bugs.python.org> wrote:
> I am still getting up to speed with all the changes that went in since
> 3.2.  I'll review your patch over the weekend.  Meanwhile, I think the
> goal should be that after PyMemoryview_FromBuffer(info) is called, it
> should be OK to discard info by calling PyBuffer_Release()

Now I'm puzzled: I thought your goal was to preserve the implicit cleanup
from 3.2, i.e. PyBuffer_Release() is called when the managed buffer is
deallocated.

Without the patch it's OK to call PyBuffer_Release(info) after
PyMemoryview_FromBuffer(info). With the patch you can't call
PyBuffer_Release(info), since it's done automatically already.

----------

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


More information about the docs mailing list