Author skrah
Recipients christian.heimes, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner
Date 2012-07-25.13:53:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343224431.85.0.00876957695118.issue12834@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2012-07-25 13:53:52skrahsetrecipients: + skrah, ncoghlan, pitrou, vstinner, christian.heimes, meador.inge, python-dev
2012-07-25 13:53:51skrahsetmessageid: <1343224431.85.0.00876957695118.issue12834@psf.upfronthosting.co.za>
2012-07-25 13:53:51skrahlinkissue12834 messages
2012-07-25 13:53:51skrahcreate