diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-13 19:50:05 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-13 19:50:05 +0000 |
commit | f62d33aa1dc5afad9abbaf257531bdc4b0fbfdc0 (patch) | |
tree | c512ba2f387febe7fa57c2e1bf52b6250d579e73 /py/runtime.c | |
parent | f88a72a88e78ce1cfbd25f0cbf1fbff5e6fd43cb (diff) | |
download | micropython-f62d33aa1dc5afad9abbaf257531bdc4b0fbfdc0.tar.gz micropython-f62d33aa1dc5afad9abbaf257531bdc4b0fbfdc0.zip |
Consolidate rt_make_function_[0123] to rt_make_function_n.
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/py/runtime.c b/py/runtime.c index 766a321bc4..f43e804b40 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -587,12 +587,7 @@ mp_obj_t rt_make_function_from_id(int unique_code_id) { fun = mp_obj_new_fun_bc(c->n_args, c->n_locals + c->n_stack, c->u_byte.code); break; case MP_CODE_NATIVE: - switch (c->n_args) { - case 0: fun = rt_make_function_0(c->u_native.fun); break; - case 1: fun = rt_make_function_1((mp_fun_1_t)c->u_native.fun); break; - case 2: fun = rt_make_function_2((mp_fun_2_t)c->u_native.fun); break; - default: assert(0); fun = mp_const_none; - } + fun = rt_make_function_n(c->n_args, c->u_native.fun); break; case MP_CODE_INLINE_ASM: fun = mp_obj_new_fun_asm(c->n_args, c->u_inline_asm.fun); |