
Oct. 27, 2010
11:48 a.m.
On Wed, 27 Oct 2010 12:02:11 +0800 Kristján Valur Jónsson <kristjan@ccpgames.com> wrote:
First of all, I'd futilely like to suggest this change for 2.x. The existing PyBuffer_FromMemory() provides no lifetime management.
By "futilely" you mean you know it won't be accepted, since 2.x is in bug fixes-only mode? :)
So, for py3k, I'd actually like to extend the Memoryview object, and provide something like PyMemoryView_FromExternal() that takes an optional pointer to a "void destructor(void *arg, void *ptr)) and an (void *arg), to be called when the buffer is released.
Sounds reasonable to me. Regards Antoine.