mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
@ -389,7 +389,7 @@ bytearray_subscript(PyByteArrayObject *self, PyObject *index)
|
|||
}
|
||||
else if (PySlice_Check(index)) {
|
||||
Py_ssize_t start, stop, step, slicelength, cur, i;
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)index,
|
||||
if (PySlice_GetIndicesEx(index,
|
||||
PyByteArray_GET_SIZE(self),
|
||||
&start, &stop, &step, &slicelength) < 0) {
|
||||
return NULL;
|
||||
|
@ -573,7 +573,7 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu
|
|||
}
|
||||
}
|
||||
else if (PySlice_Check(index)) {
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)index,
|
||||
if (PySlice_GetIndicesEx(index,
|
||||
PyByteArray_GET_SIZE(self),
|
||||
&start, &stop, &step, &slicelen) < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue