➜

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.

作者 martin.panter
收信人 JakeMont, jnoller, martin.panter, r.david.murray, sbt, serhiy.storchaka, skrah, zach.ware
日期 2015-10-31.05:48:16
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1446270497.16.0.340896227375.issue25498@psf.upfronthosting.co.za>
In-reply-to
内容
Okay, so <https://docs.python.org/dev/c-api/buffer.html#c.PyBUF_WRITABLE> says writability must be consistent. As far as I can see, there is no similar requirement for contiguity. So in theory PyBUF_FULL_RO could produce a discontiguous buffer when PyBUF_WRITABLE would have produced a contiguous one. But I guess this is rather unlikely, so Eryksun’s approach might be good enough.

I am starting to wonder why the current memory view hack should even be necessary. It seems like a memory view created by PyMemoryView_FromBuffer() will eventually do the equivalent of PyBuffer_Release(), except that it leaks a reference to the underlying Python object. This was also brought up at <https://bugs.python.org/issue15903#msg170658>, but the question is not resolved that I can see.

Possibly also related is Issue 15821, but I don’t know enough details or history to be sure.
历史
日期 用户 动作 参数
2015-10-31 05:48:17martin.panter修改recipients: + martin.panter, jnoller, r.david.murray, skrah, sbt, zach.ware, serhiy.storchaka, JakeMont
2015-10-31 05:48:17martin.panter修改messageid: <1446270497.16.0.340896227375.issue25498@psf.upfronthosting.co.za>
2015-10-31 05:48:17martin.panter链接issue25498 messages
2015-10-31 05:48:16martin.panter创建