Skip to content

Commit 64a4f11

Browse files
committed
py: Remove MP_STATE_CTX, use MP_STATE_THREAD instead (it's an alias).
MP_STATE_CTX was recently aliased to MP_STATE_THREAD and can now be removed.
1 parent 707f16b commit 64a4f11

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

py/mpstate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ typedef struct _mp_state_ctx_t {
238238

239239
extern mp_state_ctx_t mp_state_ctx;
240240

241-
#define MP_STATE_CTX(x) MP_STATE_THREAD(x)
242241
#define MP_STATE_VM(x) (mp_state_ctx.vm.x)
243242
#define MP_STATE_MEM(x) (mp_state_ctx.mem.x)
244243

py/runtime.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ void mp_arg_parse_all_kw_array(size_t n_pos, size_t n_kw, const mp_obj_t *args,
8383
NORETURN void mp_arg_error_terse_mismatch(void);
8484
NORETURN void mp_arg_error_unimpl_kw(void);
8585

86-
static inline mp_obj_dict_t *mp_locals_get(void) { return MP_STATE_CTX(dict_locals); }
87-
static inline void mp_locals_set(mp_obj_dict_t *d) { MP_STATE_CTX(dict_locals) = d; }
88-
static inline mp_obj_dict_t *mp_globals_get(void) { return MP_STATE_CTX(dict_globals); }
89-
static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_CTX(dict_globals) = d; }
86+
static inline mp_obj_dict_t *mp_locals_get(void) { return MP_STATE_THREAD(dict_locals); }
87+
static inline void mp_locals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_locals) = d; }
88+
static inline mp_obj_dict_t *mp_globals_get(void) { return MP_STATE_THREAD(dict_globals); }
89+
static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_globals) = d; }
9090

9191
mp_obj_t mp_load_name(qstr qst);
9292
mp_obj_t mp_load_global(qstr qst);

0 commit comments

Comments
 (0)