summaryrefslogtreecommitdiff
path: root/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-07-28 12:25:55 +0200
committerStefan Krah <skrah@bytereef.org>2012-07-28 12:25:55 +0200
commit7d12d9df136b45785fb945dcb4812fdb068a2498 (patch)
treea68da71ef9e618cad72d9d6b589d6bdbc589873e /Objects/bytearrayobject.c
parent6c779ea55329947577119b8a7ea732f6d540d516 (diff)
downloadcpython-git-7d12d9df136b45785fb945dcb4812fdb068a2498.tar.gz
Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r--Objects/bytearrayobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 5b7083d683..2bb3a29daa 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -789,7 +789,7 @@ bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
size = view.len;
if (PyByteArray_Resize((PyObject *)self, size) < 0) goto fail;
if (PyBuffer_ToContiguous(self->ob_bytes, &view, size, 'C') < 0)
- goto fail;
+ goto fail;
PyBuffer_Release(&view);
return 0;
fail: