runtime.c: Fix reading properties

.. this fixes the vfs_fat_ramdisk failure.
This commit is contained in:
Jeff Epler 2021-05-05 09:37:41 -05:00
parent c3ce2bacde
commit 8fae7d2e30
1 changed files with 17 additions and 17 deletions

View File

@ -1062,10 +1062,6 @@ void mp_convert_member_lookup(mp_obj_t self, const mp_obj_type_t *type, mp_obj_t
}
dest[0] = ((mp_obj_static_class_method_t *)MP_OBJ_TO_PTR(member))->fun;
dest[1] = MP_OBJ_FROM_PTR(type);
} else {
// `member` is a value, so just return that value.
dest[0] = member;
}
#if MICROPY_PY_BUILTINS_PROPERTY
// If self is MP_OBJ_NULL, we looking at the class itself, not an instance.
} else if (mp_obj_is_type(member, &mp_type_property) && mp_obj_is_native_type(type) && self != MP_OBJ_NULL) {
@ -1087,6 +1083,10 @@ void mp_convert_member_lookup(mp_obj_t self, const mp_obj_type_t *type, mp_obj_t
// `member` is a value, so just return that value.
dest[0] = member;
}
} else {
// `member` is a value, so just return that value.
dest[0] = member;
}
}
// no attribute found, returns: dest[0] == MP_OBJ_NULL, dest[1] == MP_OBJ_NULL