summaryrefslogtreecommitdiff
path: root/py/modthread.c
diff options
context:
space:
mode:
authorJeff Epler <jeff@adafruit.com>2021-03-15 13:50:49 -0500
committerGitHub <noreply@github.com>2021-03-15 13:50:49 -0500
commit05ed179e11599dd45a76dfb14ecf624d0ff96d68 (patch)
treea046c6d1f117814168150484ed1bf7840d3400d7 /py/modthread.c
parent3cbff45f9aac5ea2855bbc888083d356a91c80fe (diff)
parentf9b4189b4c640823dabb76de8effd2a836da2eb0 (diff)
Merge pull request #4362 from microDev1/code-formatting
Add code formatting and translations check
Diffstat (limited to 'py/modthread.c')
-rw-r--r--py/modthread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/modthread.c b/py/modthread.c
index 250756ef2..89b4f3fb6 100644
--- a/py/modthread.c
+++ b/py/modthread.c
@@ -122,7 +122,7 @@ STATIC MP_DEFINE_CONST_DICT(thread_lock_locals_dict, thread_lock_locals_dict_tab
STATIC const mp_obj_type_t mp_type_thread_lock = {
{ &mp_type_type },
.name = MP_QSTR_lock,
- .locals_dict = (mp_obj_dict_t*)&thread_lock_locals_dict,
+ .locals_dict = (mp_obj_dict_t *)&thread_lock_locals_dict,
};
/****************************************************************/
@@ -159,7 +159,7 @@ typedef struct _thread_entry_args_t {
STATIC void *thread_entry(void *args_in) {
// Execution begins here for a new thread. We do not have the GIL.
- thread_entry_args_t *args = (thread_entry_args_t*)args_in;
+ thread_entry_args_t *args = (thread_entry_args_t *)args_in;
mp_state_thread_t ts;
mp_thread_set_state(&ts);
@@ -195,7 +195,7 @@ STATIC void *thread_entry(void *args_in) {
} else {
// uncaught exception
// check for SystemExit
- mp_obj_base_t *exc = (mp_obj_base_t*)nlr.ret_val;
+ mp_obj_base_t *exc = (mp_obj_base_t *)nlr.ret_val;
if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(exc->type), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) {
// swallow exception silently
} else {
@@ -239,7 +239,7 @@ STATIC mp_obj_t mod_thread_start_new_thread(size_t n_args, const mp_obj_t *args)
if (mp_obj_get_type(args[2]) != &mp_type_dict) {
mp_raise_TypeError(translate("expecting a dict for keyword args"));
}
- mp_map_t *map = &((mp_obj_dict_t*)MP_OBJ_TO_PTR(args[2]))->map;
+ 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->n_kw = map->used;
// copy across the keyword arguments
@@ -296,7 +296,7 @@ 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 },
- .globals = (mp_obj_dict_t*)&mp_module_thread_globals,
+ .globals = (mp_obj_dict_t *)&mp_module_thread_globals,
};
#endif // MICROPY_PY_THREAD