Message170639
| Author |
sbt |
| Recipients |
amaury.forgeotdarc, jcea, pitrou, sbt, skrah |
| Date |
2012年09月18日.10:47:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347965270.12.0.195762674033.issue15903@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> Then the view owns a reference to the bytes object. But that does not
> solve the problem that writable memoryviews based on a readonly object
> might be hanging around.
How about doing
PyObject_GetBuffer(b, &buf, PyBUF_WRITABLE);
view = PyMemoryView_FromBuffer(&buf);
// readinto view
PyBuffer_Release(&buf);
Would attempts to access a "leaked" reference to view now result in ValueError("operation forbidden on released memoryview object")? If so then I think this would be safe. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月18日 10:47:50 | sbt | set | recipients:
+ sbt, jcea, amaury.forgeotdarc, pitrou, skrah |
| 2012年09月18日 10:47:50 | sbt | set | messageid: <1347965270.12.0.195762674033.issue15903@psf.upfronthosting.co.za> |
| 2012年09月18日 10:47:49 | sbt | link | issue15903 messages |
| 2012年09月18日 10:47:49 | sbt | create |
|