py/obj: Add accessors for type slots and use everywhere.

This is a no-op, but sets the stage for changing the mp_obj_type_t
representation.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2021-07-14 17:14:16 +10:00
committed by Damien George
parent e8355eb163
commit a52cd5b07d
27 changed files with 207 additions and 188 deletions

View File

@@ -455,7 +455,7 @@ STATIC mp_obj_t mp_builtin___repl_print__(mp_obj_t o) {
#if MICROPY_CAN_OVERRIDE_BUILTINS
// Set "_" special variable
mp_obj_t dest[2] = {MP_OBJ_SENTINEL, o};
mp_type_module.attr(MP_OBJ_FROM_PTR(&mp_module_builtins), MP_QSTR__, dest);
MP_OBJ_TYPE_GET_SLOT(&mp_type_module, attr)(MP_OBJ_FROM_PTR(&mp_module_builtins), MP_QSTR__, dest);
#endif
}
return mp_const_none;