diff options
| author | Damien George | 2014-04-08 21:32:29 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-08 21:32:29 +0100 |
| commit | f4c9b33abf0ac6ff97cd39331d125a74fd2bb897 (patch) | |
| tree | 64bdfb7d6d032d826640e1f9a43956b0b3947591 /py/objtype.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/objtype.c')
| -rw-r--r-- | py/objtype.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/objtype.c b/py/objtype.c index a2094f671..cb8cfc532 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -269,6 +269,11 @@ STATIC bool class_store_attr(mp_obj_t self_in, qstr attr, mp_obj_t value) { } bool class_store_item(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { + if (value == MP_OBJ_NULL) { + // delete item + // TODO implement me! + return false; + } mp_obj_class_t *self = self_in; mp_obj_t member = mp_obj_class_lookup(self->base.type, MP_QSTR___setitem__); if (member != MP_OBJ_NULL) { |
