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

@@ -143,8 +143,8 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) {
if (type == &mp_type_type) {
type = MP_OBJ_TO_PTR(obj);
}
if (type->locals_dict != NULL) {
map = &type->locals_dict->map;
if (MP_OBJ_TYPE_HAS_SLOT(type, locals_dict)) {
map = &MP_OBJ_TYPE_GET_SLOT(type, locals_dict)->map;
}
}
if (map != NULL) {