[python] Upgrade to micropython 1.11

This commit is contained in:
Léa Saviot
2019-08-21 09:59:33 +02:00
parent 127a166762
commit 0975ba0f10
115 changed files with 4605 additions and 2450 deletions

View File

@@ -58,7 +58,7 @@ STATIC void mp_help_print_info_about_object(mp_obj_t name_o, mp_obj_t value) {
#if MICROPY_PY_BUILTINS_HELP_MODULES
STATIC void mp_help_add_from_map(mp_obj_t list, const mp_map_t *map) {
for (size_t i = 0; i < map->alloc; i++) {
if (MP_MAP_SLOT_IS_FILLED(map, i)) {
if (mp_map_slot_is_filled(map, i)) {
mp_obj_list_append(list, map->table[i].key);
}
}
@@ -123,8 +123,10 @@ STATIC void mp_help_print_modules(void) {
mp_print_str(MP_PYTHON_PRINTER, "\n");
}
#if MICROPY_ENABLE_EXTERNAL_IMPORT
// let the user know there may be other modules available from the filesystem
mp_print_str(MP_PYTHON_PRINTER, "Plus any modules on the filesystem\n");
#endif
}
#endif
@@ -145,13 +147,13 @@ STATIC void mp_help_print_obj(const mp_obj_t obj) {
mp_map_t *map = NULL;
if (type == &mp_type_module) {
map = mp_obj_dict_get_map(mp_obj_module_get_globals(obj));
map = &mp_obj_module_get_globals(obj)->map;
} else {
if (type == &mp_type_type) {
type = MP_OBJ_TO_PTR(obj);
}
if (type->locals_dict != MP_OBJ_NULL && MP_OBJ_IS_TYPE(type->locals_dict, &mp_type_dict)) {
map = mp_obj_dict_get_map(type->locals_dict);
if (type->locals_dict != NULL) {
map = &type->locals_dict->map;
}
}
if (map != NULL) {