[Python-Dev] Allocation of shape and strides fields in Py_buffer (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Mon Dec 8 22:12:25 CET 2008
- Previous message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Next message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nick Coghlan <ncoghlan gmail.com> writes:
Actually, I think your suggested scheme for the one-dimensional case shows the way forward: ownership of the shape and strides memory belongs to the object issuing the Pybuffer struct, and that object needs to deal with it when the buffer is released. Defining a larger memory chunk with the Pybuffer as the first item and the shape and stride info tacked onto the end and returning that from PyObjectGetBuffer() means that the shape/stride info will be released automatically when the view is released via PyBufferRelease().
Ok, so another question: given that this will change the Py_buffer layout a bit, can it go into 3.0.1 and 2.6.2?
- Previous message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Next message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]