Message166400
Here's a patch for 3.3, which consists mostly of tests. A couple of points:
o I removed the len > view->len check in PyBuffer_ToContiguous(), since
the function is not documented and silently accepting output buffers
that are too large seems unusual to me.
o Removed the comment in bytesobject.c "Better way to get to internal buffer?".
IMO the answer is no: There isn't any better way that works in full generality.
o Removed the "need to check for overflow" comment: ndim is now officially
limited to 64.
I think this can go into 3.3: It's easy to see that for contiguous buffers
PyBuffer_ToContiguous() behaves in the same manner as before (except for
the len issue).
For memoryview, buffer_to_contiguous(x, y 'C') is literally the same
code as buffer_to_c_contiguous(). |
|
Date |
User |
Action |
Args |
2012-07-25 13:53:52 | skrah | set | recipients:
+ skrah, ncoghlan, pitrou, vstinner, christian.heimes, meador.inge, python-dev |
2012-07-25 13:53:51 | skrah | set | messageid: <1343224431.85.0.00876957695118.issue12834@psf.upfronthosting.co.za> |
2012-07-25 13:53:51 | skrah | link | issue12834 messages |
2012-07-25 13:53:51 | skrah | create | |
|