Message128514
> - 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:24 | pitrou | set | recipients:
+ pitrou, loewis, teoliphant, mark.dickinson, ncoghlan, rupole, kermode, pv |
2011-02-13 16:04:23 | pitrou | link | issue10181 messages |
2011-02-13 16:04:23 | pitrou | create | |
|