Message235256
Thanks. No, I don't think there's an official way to accomplish that,
but let's create one. How about a new function that takes the buffer
request flags:
PyMemoryView_FromObjectEx(exporter, PyBUF_SIMPLE|PyBUF_WRITABLE)
If we can spare a new format code, this could be called directly in
PyArg_ParseTuple(), which would give back the memoryview.
Otherwise, you get the exporter from PyArg_ParseTuple() and call
PyMemoryView_FromObjectEx() manually.
If I'm not mistaken, this would save us the intermediate buffer on the
stack, and it's more readable. |
|
Date |
User |
Action |
Args |
2015-02-02 13:09:51 | skrah | set | recipients:
+ skrah, belopolsky, pitrou, larry, Arfrever, martin.panter, serhiy.storchaka |
2015-02-02 13:09:51 | skrah | link | issue22896 messages |
2015-02-02 13:09:50 | skrah | create | |
|