Author pitrou
Recipients kermode, loewis, mark.dickinson, ncoghlan, pitrou, pv, rupole, teoliphant
Date 2011-02-13.16:04:23
SpamBayes Score 2.31648e-13
Marked as misclassified No
Message-id <1297613061.3802.43.camel@localhost.localdomain>
In-reply-to <>
> - For each buffer yielded by `bf_getbuffer`, `bf_releasebuffer`
>   is called exactly once.
>   Each `bf_releasebuffer` call is guaranteed to get the same
>   view->internal pointer as filled in previously by the
>   corresponding `bf_getbuffer`.
>   All other fields in `Py_buffer` may be modified by the consumer,
>   and `bf_releasebuffer` may not assume they contain valid data.
> - The exporter of the buffer must ensure that apart from the contents
>   of the memory pointed to by `buf`, the contents of the returned
>   Py_buffer (format, strides, shape, etc.) remain unchanged.

Yes! Can you write a patch that does these docs changes and also fixes
the internal pointer issue?

> What about the more strict requirement:
> - `bf_releasebuffer` is guaranteed that all fields except `obj`
>   are not modified?

Well, if you manage to change the memoryview implementation for that,
then fine. But I don't know how you plan to manage ownership of fields
such as strides and friends.

> BTW, should I take this discussion to Python-dev? So far, I kept it
> here, as this bug report seemed to be about general issues in the
> current implementation and spec.

I don't think you need to. Nick and Mark follow this issue (and so does
Travis if he's still alive ;)).
Date User Action Args
2011-02-13 16:04:24pitrousetrecipients: + pitrou, loewis, teoliphant, mark.dickinson, ncoghlan, rupole, kermode, pv
2011-02-13 16:04:23pitroulinkissue10181 messages
2011-02-13 16:04:23pitroucreate