summaryrefslogtreecommitdiff
path: root/py/objenumerate.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objenumerate.c')
-rw-r--r--py/objenumerate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objenumerate.c b/py/objenumerate.c
index 1a9d30f83..818725d85 100644
--- a/py/objenumerate.c
+++ b/py/objenumerate.c
@@ -39,7 +39,7 @@ typedef struct _mp_obj_enumerate_t {
STATIC mp_obj_t enumerate_iternext(mp_obj_t self_in);
-STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
#if MICROPY_CPYTHON_COMPAT
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_iterable, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
@@ -50,7 +50,7 @@ STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, siz
struct {
mp_arg_val_t iterable, start;
} arg_vals;
- mp_arg_parse_all_kw_array(n_args, n_kw, args,
+ mp_arg_parse_all(n_args, args, kw_args,
MP_ARRAY_SIZE(allowed_args), allowed_args, (mp_arg_val_t*)&arg_vals);
// create enumerate object
@@ -59,7 +59,7 @@ STATIC mp_obj_t enumerate_make_new(const mp_obj_type_t *type, size_t n_args, siz
o->iter = mp_getiter(arg_vals.iterable.u_obj, NULL);
o->cur = arg_vals.start.u_int;
#else
- (void)n_kw;
+ (void)kw_args;
mp_obj_enumerate_t *o = m_new_obj(mp_obj_enumerate_t);
o->base.type = type;
o->iter = mp_getiter(args[0], NULL);