diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-08 21:32:29 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-08 21:32:29 +0100 |
commit | f4c9b33abf0ac6ff97cd39331d125a74fd2bb897 (patch) | |
tree | 64bdfb7d6d032d826640e1f9a43956b0b3947591 /py/objarray.c | |
parent | 4671392d90e98ea4edf6e9ce7023d21cc9957d8c (diff) |
py: Remove DELETE_SUBSCR opcode, combine with STORE_SUBSCR.
This makes the runtime and object APIs more consistent. mp_store_subscr
functionality now moved into objects (ie list and dict store_item).
Diffstat (limited to 'py/objarray.c')
-rw-r--r-- | py/objarray.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/objarray.c b/py/objarray.c index c65673fff..15268112a 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -143,6 +143,10 @@ STATIC mp_obj_t array_append(mp_obj_t self_in, mp_obj_t arg) { STATIC MP_DEFINE_CONST_FUN_OBJ_2(array_append_obj, array_append); STATIC bool array_store_item(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value) { + if (value == MP_OBJ_NULL) { + // delete item; does this need to be implemented? + return false; + } mp_obj_array_t *o = self_in; uint index = mp_get_index(o->base.type, o->len, index_in, false); mp_binary_set_val(o->typecode, o->items, index, value); |