Author pitrou
Recipients amaury.forgeotdarc, barry, benjamin.peterson, donmez, gpolo, lemburg, loewis, pitrou, teoliphant
Date 2008-08-13.18:07:34
SpamBayes Score 3.77157e-08
Marked as misclassified No
Message-id <1218650852.5646.26.camel@fsol>
In-reply-to <1218557748.69.0.763380143047.issue3139@psf.upfronthosting.co.za>
Content
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?
History
Date User Action Args
2008-08-13 18:07:36pitrousetrecipients: + pitrou, lemburg, loewis, barry, teoliphant, amaury.forgeotdarc, donmez, benjamin.peterson, gpolo
2008-08-13 18:07:35pitroulinkissue3139 messages
2008-08-13 18:07:34pitroucreate