From 41dcfda5939d36a463afe3b89363a7b61b896b7c Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:24:48 +0530 Subject: [PATCH] update wifi_monitor_make_new and arg parsing --- shared-bindings/wifi/Monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/wifi/Monitor.c b/shared-bindings/wifi/Monitor.c index 3dde904741..0ddc8db4fd 100644 --- a/shared-bindings/wifi/Monitor.c +++ b/shared-bindings/wifi/Monitor.c @@ -45,7 +45,7 @@ //| """ //| ... //| -STATIC mp_obj_t wifi_monitor_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t wifi_monitor_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_channel, ARG_queue }; static const mp_arg_t allowed_args[] = { { MP_QSTR_channel, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1} }, @@ -53,7 +53,7 @@ STATIC mp_obj_t wifi_monitor_make_new(const mp_obj_type_t *type, size_t n_args, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; - mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); if (args[ARG_channel].u_int < 0 || args[ARG_channel].u_int > 11) { mp_raise_ValueError_varg(translate("%q out of bounds"), MP_QSTR_channel);