py/sequence: Remove unused len argument from mp_seq_extract_slice.
Also put this function inside the `MICROPY_PY_BUILTINS_SLICE` guard, because it's only usable when that option is enabled. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -63,11 +63,7 @@ bool mp_seq_get_fast_slice_indexes(mp_uint_t len, mp_obj_t slice, mp_bound_slice
|
||||
return indexes->step == 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
mp_obj_t mp_seq_extract_slice(size_t len, const mp_obj_t *seq, mp_bound_slice_t *indexes) {
|
||||
(void)len; // TODO can we remove len from the arg list?
|
||||
|
||||
mp_obj_t mp_seq_extract_slice(const mp_obj_t *seq, mp_bound_slice_t *indexes) {
|
||||
mp_int_t start = indexes->start, stop = indexes->stop;
|
||||
mp_int_t step = indexes->step;
|
||||
|
||||
@@ -87,6 +83,8 @@ mp_obj_t mp_seq_extract_slice(size_t len, const mp_obj_t *seq, mp_bound_slice_t
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Special-case comparison function for sequences of bytes
|
||||
// Don't pass MP_BINARY_OP_NOT_EQUAL here
|
||||
bool mp_seq_cmp_bytes(mp_uint_t op, const byte *data1, size_t len1, const byte *data2, size_t len2) {
|
||||
|
||||
Reference in New Issue
Block a user