diff options
| author | Damien George | 2014-03-24 11:49:32 +0000 |
|---|---|---|
| committer | Damien George | 2014-03-24 11:49:32 +0000 |
| commit | a82d7ef29d80070323e1a2eec1451b6c6558ceb9 (patch) | |
| tree | 02b5f9892e0cbcd848832f281a55562b26ae1506 /py/runtime.c | |
| parent | 0e9d96f18f10c3ac81f2d8c55ce6ea8b061e0f12 (diff) | |
| parent | 4750a8398b62107753d684b18e9cf2534f5de155 (diff) | |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py/runtime.c')
| -rw-r--r-- | py/runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index bbd12895a..58c662008 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -462,6 +462,11 @@ void rt_store_name(qstr qstr, mp_obj_t obj) { mp_map_lookup(map_locals, MP_OBJ_NEW_QSTR(qstr), MP_MAP_LOOKUP_ADD_IF_NOT_FOUND)->value = obj; } +void rt_delete_name(qstr qstr) { + DEBUG_OP_printf("delete name %s\n", qstr_str(qstr)); + mp_map_lookup(map_locals, MP_OBJ_NEW_QSTR(qstr), MP_MAP_LOOKUP_REMOVE_IF_FOUND); +} + void rt_store_global(qstr qstr, mp_obj_t obj) { DEBUG_OP_printf("store global %s <- %p\n", qstr_str(qstr), obj); mp_map_lookup(map_globals, MP_OBJ_NEW_QSTR(qstr), MP_MAP_LOOKUP_ADD_IF_NOT_FOUND)->value = obj; |
