Skip to content

Commit 76dc2ea

Browse files
committed
fix more things
1 parent e6d5e7f commit 76dc2ea

9 files changed

+12
-13
lines changed

shared-bindings/_pew/PewPew.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@
6262
//| buttons are connected to rows of the matrix)."""
6363
//| ...
6464
//|
65-
STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args,
66-
const mp_obj_t *pos_args, mp_map_t *kw_args) {
67-
mp_arg_check_num(n_args, kw_args, 4, 4, true);
65+
STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw,
66+
const mp_obj_t *pos_args) {
6867
enum { ARG_buffer, ARG_rows, ARG_cols, ARG_buttons };
6968
static const mp_arg_t allowed_args[] = {
7069
{ MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED },
@@ -73,7 +72,7 @@ STATIC mp_obj_t pewpew_make_new(const mp_obj_type_t *type, size_t n_args,
7372
{ MP_QSTR_buttons, MP_ARG_OBJ | MP_ARG_REQUIRED },
7473
};
7574
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
76-
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args),
75+
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args),
7776
allowed_args, args);
7877

7978
mp_buffer_info_t bufinfo;

shared-bindings/gamepadshift/GamePadShift.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//| ...
5151
//|
5252
STATIC mp_obj_t gamepadshift_make_new(const mp_obj_type_t *type, size_t n_args,
53-
const mp_obj_t *pos_args, mp_map_t *kw_args) {
53+
size_t n_kw, const mp_obj_t *pos_args) {
5454

5555
enum { ARG_clock, ARG_data, ARG_latch };
5656
static const mp_arg_t allowed_args[] = {
@@ -59,7 +59,7 @@ STATIC mp_obj_t gamepadshift_make_new(const mp_obj_type_t *type, size_t n_args,
5959
{ MP_QSTR_latch, MP_ARG_REQUIRED | MP_ARG_OBJ},
6060
};
6161
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
62-
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args),
62+
mp_arg_parse_all_kw_array(n_args, n_kw, pos_args, MP_ARRAY_SIZE(allowed_args),
6363
allowed_args, args);
6464

6565
digitalio_digitalinout_obj_t *clock_pin = assert_digitalinout(args[ARG_clock].u_obj);

0 commit comments

Comments
 (0)