diff options
| author | Damien | 2013-12-29 22:32:51 +0000 |
|---|---|---|
| committer | Damien | 2013-12-29 22:32:51 +0000 |
| commit | dae7eb7226a46856621023a9488f177d451e2c3e (patch) | |
| tree | f4ad72373a82ca86ad12459333ca299edc0ab8a7 /py/builtin.c | |
| parent | 732407f1bf12364375162e8fb73816532a5d139c (diff) | |
py: add dict length function, and fix rt_store_set.
Diffstat (limited to 'py/builtin.c')
| -rw-r--r-- | py/builtin.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/py/builtin.c b/py/builtin.c index f6b57109c..f39ab03d4 100644 --- a/py/builtin.c +++ b/py/builtin.c @@ -209,11 +209,8 @@ mp_obj_t mp_builtin_len(mp_obj_t o_in) { mp_obj_t *seq_items; mp_obj_list_get(o_in, &seq_len, &seq_items); len = seq_len; - /* TODO } else if (MP_OBJ_IS_TYPE(o_in, &dict_type)) { - mp_obj_base_t *o = o_in; - len = o->u_map.used; - */ + len = mp_obj_dict_len(o_in); } else { nlr_jump(mp_obj_new_exception_msg_1_arg(rt_q_TypeError, "object of type '%s' has no len()", mp_obj_get_type_str(o_in))); } |
