diff options
author | Damien George <damien.p.george@gmail.com> | 2014-06-01 13:49:35 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-06-01 13:49:35 +0100 |
commit | c49ddb9315b8a3839439727d5a3df1f4226777e1 (patch) | |
tree | 1c91fb61706f2f8083dd1564890679c7935348f5 /py/sequence.c | |
parent | 3ebd4d0cae58241c963cabd3cbd02fc9ca261a2f (diff) |
py: Fix configurability of builtin slice.
Diffstat (limited to 'py/sequence.c')
-rw-r--r-- | py/sequence.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/sequence.c b/py/sequence.c index c940d9f69..c73f3baba 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -51,6 +51,8 @@ void mp_seq_multiply(const void *items, uint item_sz, uint len, uint times, void } } +#if MICROPY_PY_BUILTINS_SLICE + bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, mp_bound_slice_t *indexes) { mp_obj_t ostart, ostop, ostep; machine_int_t start, stop; @@ -102,6 +104,8 @@ bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, mp_bound_ return true; } +#endif + mp_obj_t mp_seq_extract_slice(uint len, const mp_obj_t *seq, mp_bound_slice_t *indexes) { machine_int_t start = indexes->start, stop = indexes->stop; machine_int_t step = indexes->step; |