diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-10 06:37:11 +0200 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-10 07:13:32 +0200 |
| commit | 0cd1dc06e673e86058eb14cdd7ae6622cb57fde5 (patch) | |
| tree | 0a40e8da4e193922c108daaeb9f8dbd4a8beca4b /py/obj.h | |
| parent | 76f06de96dbdc4274eb059efe1ce2020f9921835 (diff) | |
Factor out mp_seq_index_obj() function to implement .index() on sequences.
Diffstat (limited to 'py/obj.h')
| -rw-r--r-- | py/obj.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -402,3 +402,4 @@ bool m_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, machine_ui #define m_seq_cat(dest, src1, len1, src2, len2, item_t) { memcpy(dest, src1, len1 * sizeof(item_t)); memcpy(dest + len1, src2, len2 * sizeof(item_t)); } bool mp_seq_cmp_bytes(int op, const byte *data1, uint len1, const byte *data2, uint len2); bool mp_seq_cmp_objs(int op, const mp_obj_t *items1, uint len1, const mp_obj_t *items2, uint len2); +mp_obj_t mp_seq_index_obj(const mp_obj_t *items, uint len, uint n_args, const mp_obj_t *args); |
