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 amaury.forgeotdarc, belopolsky, ncoghlan, pitrou, teoliphant
Date 2008-12-12.09:47:02
SpamBayes Score 2.8465227e-08
Marked as misclassified No
Message-id <1229075224.4.0.419550084268.issue4580@psf.upfronthosting.co.za>
In-reply-to
Content
Trying another way of getting the point across... if Py_buffer wasn't
defined in PEP 3118, there would have to be some *other* API there
whereby the memoryview implementation could ask an object for a
description of the data layout of the object's buffer.

It is Py_buffer which allows the implementation of memoryview to even be
contemplated.

The one point where the PEP is silent (and I think this might be what
you've been attempting to get at) is as to whether or not it is OK for a
client to *modify* the contents of the Py_buffer structure before
passing it back in to PyBuffer_Release.

And to that I would say that a robust type implementation shouldn't be
assuming *anything* about the contents of the Py_buffer passed to
PyBuffer_Release. If it needs to do more than decrement a reference
count when the buffer is released (e.g. releasing memory allocated for
shapes and strides information), then it should be doing its own
internal bookkeeping based on the address of the Py_buffer object
originally passed to PyObject_GetBuffer.
History
Date User Action Args
2008-12-12 09:47:04ncoghlansetrecipients: + ncoghlan, teoliphant, amaury.forgeotdarc, belopolsky, pitrou
2008-12-12 09:47:04ncoghlansetmessageid: <1229075224.4.0.419550084268.issue4580@psf.upfronthosting.co.za>
2008-12-12 09:47:03ncoghlanlinkissue4580 messages
2008-12-12 09:47:02ncoghlancreate