diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:38:54 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:38:54 +0000 |
commit | 491cbd6a7cd0a212e28c548789db432b4e64327e (patch) | |
tree | 5e8ff14972d26e05c7ef5f047f6f1c799836fc40 /stmhal/extint.c | |
parent | 33b3a6905d30157efa8393893fd11a5104834354 (diff) |
py: Add keyword arg support to enumerate constructor.
Need to have a policy as to how far we go adding keyword support to
built ins. It's nice to have, and gets better CPython compatibility,
but hurts the micro nature of uPy.
Addresses issue #577.
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r-- | stmhal/extint.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/stmhal/extint.c b/stmhal/extint.c index 8041af202..24d51ffb8 100644 --- a/stmhal/extint.c +++ b/stmhal/extint.c @@ -302,10 +302,8 @@ STATIC mp_obj_t extint_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const // type_in == extint_obj_type // parse args - mp_map_t kw_args; - mp_map_init_fixed_table(&kw_args, n_kw, args + n_args); mp_arg_val_t vals[PYB_EXTINT_MAKE_NEW_NUM_ARGS]; - mp_arg_parse_all(n_args, args, &kw_args, PYB_EXTINT_MAKE_NEW_NUM_ARGS, pyb_extint_make_new_args, vals); + mp_arg_parse_all_kw_array(n_args, n_kw, args, PYB_EXTINT_MAKE_NEW_NUM_ARGS, pyb_extint_make_new_args, vals); extint_obj_t *self = m_new_obj(extint_obj_t); self->base.type = type_in; |