Message125499
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. |
|
Date |
User |
Action |
Args |
2011-01-06 02:10:02 | ncoghlan | set | recipients:
+ ncoghlan, loewis, teoliphant, mark.dickinson, rupole, kermode, pitrou |
2011-01-06 02:10:02 | ncoghlan | set | messageid: <1294279802.37.0.800965322257.issue10181@psf.upfronthosting.co.za> |
2011-01-06 02:09:52 | ncoghlan | link | issue10181 messages |
2011-01-06 02:09:52 | ncoghlan | create | |
|