Stefan Krah <[email protected]> added the comment:
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().
----------
keywords: +patch
Added file: http://bugs.python.org/file26512/issue12834.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12834>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com