Roger Upole <rup...@hotmail.com> added the comment:

The culprit wrt copying Py_buffer structs seems mainly to be dup_buffer, which 
is called in memory_getbuf.  This seems unnecessary in the case where there's 
an underlying object and it has returned the view thru its own tp_as_buffer.  
The underlying object at that point is solely responsible for releasing the 
buffer, so memory_getbuf shouldn't mess with it at all.  In the case where 
there is no underlying object (mainly thru PyMemoryView_FromBuffer), it 
probably should allocate any memory in the view in such a way that it can be 
freed in memory_releasebuf when the view->obj is NULL.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to