diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/mpstate.h | 1 | ||||
-rw-r--r-- | py/runtime.h | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 29f93870a8..0134dd8e88 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -238,7 +238,6 @@ typedef struct _mp_state_ctx_t { extern mp_state_ctx_t mp_state_ctx; -#define MP_STATE_CTX(x) MP_STATE_THREAD(x) #define MP_STATE_VM(x) (mp_state_ctx.vm.x) #define MP_STATE_MEM(x) (mp_state_ctx.mem.x) diff --git a/py/runtime.h b/py/runtime.h index d4b1fa79a6..1778691454 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -83,10 +83,10 @@ void mp_arg_parse_all_kw_array(size_t n_pos, size_t n_kw, const mp_obj_t *args, NORETURN void mp_arg_error_terse_mismatch(void); NORETURN void mp_arg_error_unimpl_kw(void); -static inline mp_obj_dict_t *mp_locals_get(void) { return MP_STATE_CTX(dict_locals); } -static inline void mp_locals_set(mp_obj_dict_t *d) { MP_STATE_CTX(dict_locals) = d; } -static inline mp_obj_dict_t *mp_globals_get(void) { return MP_STATE_CTX(dict_globals); } -static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_CTX(dict_globals) = d; } +static inline mp_obj_dict_t *mp_locals_get(void) { return MP_STATE_THREAD(dict_locals); } +static inline void mp_locals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_locals) = d; } +static inline mp_obj_dict_t *mp_globals_get(void) { return MP_STATE_THREAD(dict_globals); } +static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_globals) = d; } mp_obj_t mp_load_name(qstr qst); mp_obj_t mp_load_global(qstr qst); |