Message202831
-1 on complicating the code further. It would be possible to pass
an existing memoryview to mbuf_add_view(). That would save the line
mv = memory_alloc().
But:
a) You need to check that ndim is correct (shape, strides and
suboffsets are allocated via the struct hack).
b) You need to check for existing exports of the memoryview.
c) ... probably other things that would surface on closer examination. |
|
Date |
User |
Action |
Args |
2013-11-14 12:02:23 | skrah | set | recipients:
+ skrah, pitrou, mpb |
2013-11-14 12:02:23 | skrah | set | messageid: <1384430543.36.0.524038343533.issue19577@psf.upfronthosting.co.za> |
2013-11-14 12:02:23 | skrah | link | issue19577 messages |
2013-11-14 12:02:23 | skrah | create | |
|