Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le mardi 12 août 2008 à 16:15 +0000, Martin v. Löwis a écrit : > I also started working on porting it to 3.0, but couldn't complete that > port yet - the memoryview object doesn't play nicely.
I've seen your recent merge and I don't know if you have finished with it. I think we should drop the "base" member in PyMemoryViewObject, it has become redundant and confusing. There are some places in memoryobject.c where base seems mistakingly used instead of view.obj, e.g. PyMemoryView_FromMemory INCREFs view.obj, but memory_dealloc DECREFs base. Also, I don't understand why memory_getbuf INCREFs view.obj, there is no corresponding DECREF in memory_releasebuf and view.obj should already have been INCREFed anyway. (if people want to get easily at the base object, we could provide be a macro e.g. PyMemory_GET_BASE()) By the way, perhaps PyBuffer_Release should set view->obj and view->buf to NULL (and view->len to -1?), it would be a simple way to signal that the buffer can't be used anymore. What do you think? _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com