Commit f87b35e7 authored by Damien George's avatar Damien George
Browse files

py: Fix mp_arg_parse_all.

parent 13c19c57
......@@ -57,11 +57,11 @@ void mp_arg_parse_all(uint n_pos, const mp_obj_t *pos, mp_map_t *kws, uint n_all
given_arg = kw->value;
}
}
if (allowed[i].flags == MP_ARG_PARSE_BOOL) {
if ((allowed[i].flags & MP_ARG_PARSE_KIND_MASK) == MP_ARG_PARSE_BOOL) {
out_vals[i].u_bool = mp_obj_is_true(given_arg);
} else if (allowed[i].flags == MP_ARG_PARSE_INT) {
} else if ((allowed[i].flags & MP_ARG_PARSE_KIND_MASK) == MP_ARG_PARSE_INT) {
out_vals[i].u_int = mp_obj_get_int(given_arg);
} else if (allowed[i].flags == MP_ARG_PARSE_OBJ) {
} else if ((allowed[i].flags & MP_ARG_PARSE_KIND_MASK) == MP_ARG_PARSE_OBJ) {
out_vals[i].u_obj = given_arg;
} else {
assert(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment