diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-23 21:19:02 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-23 22:00:04 +0200 |
commit | f909034400b3552c933582357d1986dae5b70d04 (patch) | |
tree | 31c68a910a97eccc88bd3df61a94e77a30303afa /py/runtime.h | |
parent | 4b2b7ceca7915d014a191d3776bc29bdbc5faf02 (diff) |
py: Implement support for "except Exception as var" clause.
For this, needed to implement DELETE_NAME bytecode (because var bound
in except clause is automatically deleted at its end).
http://docs.python.org/3/reference/compound_stmts.html#except :
"When an exception has been assigned using as target, it is cleared at
the end of the except clause."
Diffstat (limited to 'py/runtime.h')
-rw-r--r-- | py/runtime.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h index 7215cc889..3980e50cc 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -12,6 +12,7 @@ mp_obj_t rt_get_cell(mp_obj_t cell); void rt_set_cell(mp_obj_t cell, mp_obj_t val); void rt_store_name(qstr qstr, mp_obj_t obj); void rt_store_global(qstr qstr, mp_obj_t obj); +void rt_delete_name(qstr qstr); mp_obj_t rt_unary_op(int op, mp_obj_t arg); mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs); mp_obj_t rt_make_function_from_id(int unique_code_id, mp_obj_t def_args); |