[Python-ideas] ExternalMemory (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Oct 27 12:48:26 CEST 2010
- Previous message: [Python-ideas] ExternalMemory
- Next message: [Python-ideas] ExternalMemory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 27 Oct 2010 12:02:11 +0800 Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
First of all, I'd futilely like to suggest this change for 2.x. The existing PyBufferFromMemory() 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 PyMemoryViewFromExternal() 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.
- Previous message: [Python-ideas] ExternalMemory
- Next message: [Python-ideas] ExternalMemory
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]