diff options
Diffstat (limited to 'py/objtuple.h')
| -rw-r--r-- | py/objtuple.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/py/objtuple.h b/py/objtuple.h index d09e0e8f0..c4133d562 100644 --- a/py/objtuple.h +++ b/py/objtuple.h @@ -30,38 +30,30 @@ typedef struct _mp_obj_tuple_t { mp_obj_base_t base; - mp_uint_t len; + size_t len; mp_obj_t items[]; } mp_obj_tuple_t; // TODO(tannewt): Remove this when we no longer hard code the usb hid tuple. typedef struct _mp_obj_tuple2_t { mp_obj_base_t base; - mp_uint_t len; + size_t len; mp_obj_t items[2]; } mp_obj_tuple2_t; typedef struct _mp_rom_obj_tuple_t { mp_obj_base_t base; - uint32_t len; + size_t len; mp_rom_obj_t items[]; } mp_rom_obj_tuple_t; -// This is identical to the type above except it makes it clear that there is -// only one item. This makes lto happy with the namedtuple_base_tuple. -typedef struct _mp_rom_obj_tuple1_t { - mp_obj_base_t base; - uint32_t len; - mp_rom_obj_t items[1]; -} mp_rom_obj_tuple1_t; - extern const mp_obj_type_t mp_type_tuple; void mp_obj_tuple_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind); mp_obj_t mp_obj_tuple_unary_op(mp_uint_t op, mp_obj_t self_in); mp_obj_t mp_obj_tuple_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs); mp_obj_t mp_obj_tuple_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value); -mp_obj_t mp_obj_tuple_getiter(mp_obj_t o_in); +mp_obj_t mp_obj_tuple_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf); extern const mp_obj_type_t mp_type_attrtuple; @@ -76,6 +68,6 @@ extern const mp_obj_type_t mp_type_attrtuple; void mp_obj_attrtuple_print_helper(const mp_print_t *print, const qstr *fields, mp_obj_tuple_t *o); #endif -mp_obj_t mp_obj_new_attrtuple(const qstr *fields, mp_uint_t n, const mp_obj_t *items); +mp_obj_t mp_obj_new_attrtuple(const qstr *fields, size_t n, const mp_obj_t *items); #endif // __MICROPY_INCLUDED_PY_OBJTUPLE_H__ |
