py/objslice: Inline fetching of slice paramters in str_subscr().

To reduce code size.
This commit is contained in:
Nicko van Someren
2019-11-20 18:53:07 -07:00
committed by Damien George
parent 4c93955b7b
commit 10709846f3
3 changed files with 11 additions and 17 deletions

View File

@@ -786,7 +786,12 @@ typedef struct {
} mp_bound_slice_t;
// slice
void mp_obj_slice_get(mp_obj_t self_in, mp_obj_t *start, mp_obj_t *stop, mp_obj_t *step);
typedef struct _mp_obj_slice_t {
mp_obj_base_t base;
mp_obj_t start;
mp_obj_t stop;
mp_obj_t step;
} mp_obj_slice_t;
void mp_obj_slice_indices(mp_obj_t self_in, mp_int_t length, mp_bound_slice_t *result);
// functions