diff options
Diffstat (limited to 'py/modthread.c')
-rw-r--r-- | py/modthread.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/py/modthread.c b/py/modthread.c index 6c8340c928..6f55281adc 100644 --- a/py/modthread.c +++ b/py/modthread.c @@ -93,7 +93,7 @@ STATIC mp_obj_t thread_lock_acquire(size_t n_args, const mp_obj_t *args) { self->locked = true; return mp_const_true; } else { - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(-ret))); + mp_raise_OSError(-ret); } #endif } @@ -239,7 +239,7 @@ STATIC mp_obj_t mod_thread_start_new_thread(size_t n_args, const mp_obj_t *args) } else { // positional and keyword arguments if (mp_obj_get_type(args[2]) != &mp_type_dict) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "expecting a dict for keyword args")); + mp_raise_msg(&mp_type_TypeError, "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); @@ -294,7 +294,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_thread_globals, mp_module_thread_globals_t const mp_obj_module_t mp_module_thread = { .base = { &mp_type_module }, - .name = MP_QSTR__thread, .globals = (mp_obj_dict_t*)&mp_module_thread_globals, }; |