Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.

This commit is contained in:
Stefan Krah 2012-07-28 12:25:55 +02:00
parent 6c779ea553
commit 7d12d9df13
8 changed files with 410 additions and 68 deletions

View file

@ -2591,7 +2591,6 @@ PyBytes_FromObject(PyObject *x)
new = PyBytes_FromStringAndSize(NULL, view.len);
if (!new)
goto fail;
/* XXX(brett.cannon): Better way to get to internal buffer? */
if (PyBuffer_ToContiguous(((PyBytesObject *)new)->ob_sval,
&view, view.len, 'C') < 0)
goto fail;