mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
merge 3.4 (closes #22605)
This commit is contained in:
commit
588dad0308
1 changed files with 1 additions and 1 deletions
|
@ -2709,7 +2709,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
self->allocated = Py_SIZE(self);
|
self->allocated = Py_SIZE(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (initial != NULL && array_Check(initial)) {
|
else if (initial != NULL && array_Check(initial) && len > 0) {
|
||||||
arrayobject *self = (arrayobject *)a;
|
arrayobject *self = (arrayobject *)a;
|
||||||
arrayobject *other = (arrayobject *)initial;
|
arrayobject *other = (arrayobject *)initial;
|
||||||
memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);
|
memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue