mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
|
@ -599,7 +599,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
|
|||
else if (PySlice_Check(key)) {
|
||||
Py_ssize_t start, stop, step, slicelength;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject*)key, get_shape0(view),
|
||||
if (PySlice_GetIndicesEx(key, get_shape0(view),
|
||||
&start, &stop, &step, &slicelength) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -678,7 +678,7 @@ memory_ass_sub(PyMemoryViewObject *self, PyObject *key, PyObject *value)
|
|||
else if (PySlice_Check(key)) {
|
||||
Py_ssize_t stop, step;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject*)key, get_shape0(view),
|
||||
if (PySlice_GetIndicesEx(key, get_shape0(view),
|
||||
&start, &stop, &step, &len) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue