This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients kermode, loewis, mark.dickinson, ncoghlan, pitrou, rupole, teoliphant
Date 2011-01-06.02:09:52
SpamBayes Score 2.7030617e-07
Marked as misclassified No
Message-id <1294279802.37.0.800965322257.issue10181@psf.upfronthosting.co.za>
In-reply-to
Content
It's OK if the Py_buffer is on the stack - it's just a unique identifier for the exporter to use as a key, not something the exporter controls the lifecycle of (the latter is true only for the pointers *inside* the struct, such as buf, shape, strides, etc).

PyMemoryView_FromBuffer should be calling PyObject_Getbuffer on the view->obj member (it's one of the things that embedding the reference allows, just as it allowed removal of the separate obj argument from the PyObject_ReleaseBuffer signature). That way the source object knows there is now a *second* Py_buffer struct kicking around, and can decide whether to re-use the same internal pointers or create new ones.
History
Date User Action Args
2011-01-06 02:10:02ncoghlansetrecipients: + ncoghlan, loewis, teoliphant, mark.dickinson, rupole, kermode, pitrou
2011-01-06 02:10:02ncoghlansetmessageid: <1294279802.37.0.800965322257.issue10181@psf.upfronthosting.co.za>
2011-01-06 02:09:52ncoghlanlinkissue10181 messages
2011-01-06 02:09:52ncoghlancreate