summaryrefslogtreecommitdiff
path: root/py/modthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/modthread.c')
-rw-r--r--py/modthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modthread.c b/py/modthread.c
index e4dcccd25..3a8a1e03c 100644
--- a/py/modthread.c
+++ b/py/modthread.c
@@ -235,7 +235,7 @@ STATIC mp_obj_t mod_thread_start_new_thread(size_t n_args, const mp_obj_t *args)
// check for keyword arguments
if (n_args == 2) {
// just position arguments
- th_args = m_new_obj_var(thread_entry_args_t, mp_obj_t, pos_args_len);
+ th_args = m_new_obj_var(thread_entry_args_t, args, mp_obj_t, pos_args_len);
th_args->n_kw = 0;
} else {
// positional and keyword arguments
@@ -243,7 +243,7 @@ STATIC mp_obj_t mod_thread_start_new_thread(size_t n_args, const mp_obj_t *args)
mp_raise_TypeError(MP_ERROR_TEXT("expecting a dict for keyword args"));
}
mp_map_t *map = &((mp_obj_dict_t *)MP_OBJ_TO_PTR(args[2]))->map;
- th_args = m_new_obj_var(thread_entry_args_t, mp_obj_t, pos_args_len + 2 * map->used);
+ th_args = m_new_obj_var(thread_entry_args_t, args, mp_obj_t, pos_args_len + 2 * map->used);
th_args->n_kw = map->used;
// copy across the keyword arguments
for (size_t i = 0, n = pos_args_len; i < map->alloc; ++i) {