summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-02 02:38:22 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-02 02:38:22 +0200
commit7364af2d8cd72467bbb3bf135b29fae47105b232 (patch)
tree7e57caabe5eb86a71f394f02858a6519ecf9e075 /py/obj.h
parenta9459bc7233e92a6516c3fbc8a18a9d33966e244 (diff)
downloadmicropython-7364af2d8cd72467bbb3bf135b29fae47105b232.tar.gz
micropython-7364af2d8cd72467bbb3bf135b29fae47105b232.zip
Factor out m_seq_get_fast_slice_indexes() fucntions as sequence helper.
Takes slice object and sequence length and computes subsequence indexes for case of slice step=1.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index 0680e6fb1c..45430d4a1c 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -395,3 +395,4 @@ typedef struct _mp_obj_classmethod_t {
// sequence helpers
void mp_seq_multiply(const void *items, uint item_sz, uint len, uint times, void *dest);
+bool m_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, machine_uint_t *begin, machine_uint_t *end);