mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.
This commit is contained in:
parent
6c779ea553
commit
7d12d9df13
8 changed files with 410 additions and 68 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue