summaryrefslogtreecommitdiffstatshomepage
path: root/py/argcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/argcheck.c')
-rw-r--r--py/argcheck.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/argcheck.c b/py/argcheck.c
index 924a60c455..bb26bd3aea 100644
--- a/py/argcheck.c
+++ b/py/argcheck.c
@@ -103,3 +103,9 @@ void mp_arg_parse_all(uint n_pos, const mp_obj_t *pos, mp_map_t *kws, uint n_all
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "extra keyword arguments given"));
}
}
+
+void mp_arg_parse_all_kw_array(uint n_pos, uint n_kw, const mp_obj_t *args, uint n_allowed, const mp_arg_t *allowed, mp_arg_val_t *out_vals) {
+ mp_map_t kw_args;
+ mp_map_init_fixed_table(&kw_args, n_kw, args + n_pos);
+ mp_arg_parse_all(n_pos, args, &kw_args, n_allowed, allowed, out_vals);
+}