@@ -4434,9 +4434,7 @@ Array_subscript(PyObject *_self, PyObject *item)
44344434 PyObject * np ;
44354435 Py_ssize_t start , stop , step , slicelen , cur , i ;
44364436
4437- if (PySlice_GetIndicesEx ((PySliceObject * )item ,
4438- self -> b_length , & start , & stop ,
4439- & step , & slicelen ) < 0 ) {
4437+ if (_PySlice_Unpack (item , & start , & stop , & step ) < 0 ) {
44404438 return NULL ;
44414439 }
44424440
@@ -4447,6 +4445,7 @@ Array_subscript(PyObject *_self, PyObject *item)
44474445 assert (itemdict ); /* proto is the item type of the array, a
44484446 ctypes type, so this cannot be NULL */
44494447
4448+ slicelen = _PySlice_AdjustIndices (self -> b_length , & start , & stop , step );
44504449 if (itemdict -> getfunc == _ctypes_get_fielddesc ("c" )-> getfunc ) {
44514450 char * ptr = (char * )self -> b_ptr ;
44524451 char * dest ;
@@ -4613,7 +4612,7 @@ Array_ass_subscript(PyObject *_self, PyObject *item, PyObject *value)
46134612 else if (PySlice_Check (item )) {
46144613 Py_ssize_t start , stop , step , slicelen , otherlen , i , cur ;
46154614
4616- if (_PySlice_Unpack (( PySliceObject * ) item , & start , & stop , & step ) < 0 ) {
4615+ if (_PySlice_Unpack (item , & start , & stop , & step ) < 0 ) {
46174616 return -1 ;
46184617 }
46194618 slicelen = _PySlice_AdjustIndices (self -> b_length , & start , & stop , step );
0 commit comments