summaryrefslogtreecommitdiff
path: root/py/objnamedtuple.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objnamedtuple.c')
-rw-r--r--py/objnamedtuple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c
index e586f0894..0adf83fe9 100644
--- a/py/objnamedtuple.c
+++ b/py/objnamedtuple.c
@@ -110,7 +110,7 @@ STATIC mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args,
// Create a namedtuple with explicit malloc. Calling mp_obj_new_tuple
// with num_fields=0 returns a read-only object.
- mp_obj_tuple_t *tuple = mp_obj_malloc_var(mp_obj_tuple_t, mp_obj_t, num_fields, type_in);
+ mp_obj_tuple_t *tuple = mp_obj_malloc_var(mp_obj_tuple_t, items, mp_obj_t, num_fields, type_in);
tuple->len = num_fields;
// Copy the positional args into the first slots of the namedtuple