mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
@ -2112,7 +2112,7 @@ array_subscr(arrayobject* self, PyObject* item)
|
|||
arrayobject* ar;
|
||||
int itemsize = self->ob_descr->itemsize;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject*)item, Py_SIZE(self),
|
||||
if (PySlice_GetIndicesEx(item, Py_SIZE(self),
|
||||
&start, &stop, &step, &slicelength) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2183,7 +2183,7 @@ array_ass_subscr(arrayobject* self, PyObject* item, PyObject* value)
|
|||
return (*self->ob_descr->setitem)(self, i, value);
|
||||
}
|
||||
else if (PySlice_Check(item)) {
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)item,
|
||||
if (PySlice_GetIndicesEx(item,
|
||||
Py_SIZE(self), &start, &stop,
|
||||
&step, &slicelength) < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue