From 30628d1bb782006c88325a086ddfcd5c2e5ddbb4 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 17 Aug 2022 16:18:31 +1000 Subject: [PATCH] all: Rename MP_QSTR_umodule to MP_QSTR_module everywhere. This renames the builtin-modules, such that help('modules') and printing the module object will show "module" rather than "umodule". This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared --- examples/natmod/uheapq/uheapq.c | 2 +- examples/natmod/urandom/urandom.c | 2 +- examples/natmod/ure/ure.c | 2 +- examples/natmod/uzlib/uzlib.c | 2 +- extmod/modbluetooth.c | 4 ++-- extmod/modlwip.c | 2 +- extmod/modubinascii.c | 4 ++-- extmod/moducryptolib.c | 4 ++-- extmod/moduhashlib.c | 4 ++-- extmod/moduheapq.c | 4 ++-- extmod/modujson.c | 4 ++-- extmod/moduos.c | 6 +++--- extmod/moduplatform.c | 4 ++-- extmod/modurandom.c | 4 ++-- extmod/modure.c | 6 +++--- extmod/moduselect.c | 4 ++-- extmod/modusocket.c | 4 ++-- extmod/modussl_axtls.c | 8 ++++---- extmod/modussl_mbedtls.c | 8 ++++---- extmod/modutime.c | 4 ++-- extmod/modutimeq.c | 8 ++++---- extmod/moduwebsocket.c | 4 ++-- extmod/moduzlib.c | 4 ++-- ports/cc3200/mods/modmachine.c | 4 ++-- ports/cc3200/mods/moduhashlib.c | 2 +- ports/cc3200/mods/moduos.c | 4 ++-- ports/cc3200/mods/modusocket.c | 4 ++-- ports/cc3200/mods/modussl.c | 6 +++--- ports/cc3200/mpconfigport.h | 2 +- ports/esp32/modmachine.c | 4 ++-- ports/esp32/modsocket.c | 4 ++-- ports/esp8266/modmachine.c | 4 ++-- ports/mimxrt/modmachine.c | 4 ++-- ports/nrf/modules/machine/modmachine.c | 4 ++-- ports/nrf/modules/uos/moduos.c | 4 ++-- ports/qemu-arm/modmachine.c | 4 ++-- ports/renesas-ra/README.md | 4 ++-- ports/renesas-ra/modmachine.c | 4 ++-- ports/renesas-ra/mpconfigport.h | 2 +- ports/rp2/README.md | 4 ++-- ports/rp2/modmachine.c | 4 ++-- ports/samd/modmachine.c | 4 ++-- ports/stm32/modmachine.c | 4 ++-- ports/stm32/mpconfigport.h | 2 +- ports/unix/modmachine.c | 4 ++-- ports/unix/moduselect.c | 4 ++-- ports/unix/modusocket.c | 4 ++-- ports/zephyr/README.md | 4 ++-- ports/zephyr/modmachine.c | 4 ++-- ports/zephyr/modusocket.c | 4 ++-- py/modarray.c | 4 ++-- py/modcollections.c | 4 ++-- py/modio.c | 4 ++-- py/modstruct.c | 4 ++-- py/modsys.c | 2 +- py/moduerrno.c | 4 ++-- 56 files changed, 111 insertions(+), 111 deletions(-) diff --git a/examples/natmod/uheapq/uheapq.c b/examples/natmod/uheapq/uheapq.c index 9da6bb4ada..75f00e15cb 100644 --- a/examples/natmod/uheapq/uheapq.c +++ b/examples/natmod/uheapq/uheapq.c @@ -7,7 +7,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) { MP_DYNRUNTIME_INIT_ENTRY - mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_uheapq)); + mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_heapq)); mp_store_global(MP_QSTR_heappush, MP_OBJ_FROM_PTR(&mod_uheapq_heappush_obj)); mp_store_global(MP_QSTR_heappop, MP_OBJ_FROM_PTR(&mod_uheapq_heappop_obj)); mp_store_global(MP_QSTR_heapify, MP_OBJ_FROM_PTR(&mod_uheapq_heapify_obj)); diff --git a/examples/natmod/urandom/urandom.c b/examples/natmod/urandom/urandom.c index e1fed6a554..bb41bf3f8e 100644 --- a/examples/natmod/urandom/urandom.c +++ b/examples/natmod/urandom/urandom.c @@ -16,7 +16,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a yasmarang_n = 69; yasmarang_d = 233; - mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_urandom)); + mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_random)); mp_store_global(MP_QSTR_getrandbits, MP_OBJ_FROM_PTR(&mod_urandom_getrandbits_obj)); mp_store_global(MP_QSTR_seed, MP_OBJ_FROM_PTR(&mod_urandom_seed_obj)); #if MICROPY_PY_URANDOM_EXTRA_FUNCS diff --git a/examples/natmod/ure/ure.c b/examples/natmod/ure/ure.c index d4bd680abd..c51df2a475 100644 --- a/examples/natmod/ure/ure.c +++ b/examples/natmod/ure/ure.c @@ -63,7 +63,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a MP_OBJ_TYPE_SET_SLOT(&match_type, locals_dict, (void*)&match_locals_dict, 1); re_type.base.type = (void*)&mp_fun_table.type_type; - re_type.name = MP_QSTR_ure; + re_type.name = MP_QSTR_re; MP_OBJ_TYPE_SET_SLOT(&re_type, print, re_print, 0); re_locals_dict_table[0] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_match), MP_OBJ_FROM_PTR(&re_match_obj) }; re_locals_dict_table[1] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_search), MP_OBJ_FROM_PTR(&re_search_obj) }; diff --git a/examples/natmod/uzlib/uzlib.c b/examples/natmod/uzlib/uzlib.c index 9cf58b10e7..06b24f4b81 100644 --- a/examples/natmod/uzlib/uzlib.c +++ b/examples/natmod/uzlib/uzlib.c @@ -27,7 +27,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a decompio_locals_dict_table[2] = (mp_map_elem_t){ MP_OBJ_NEW_QSTR(MP_QSTR_readline), MP_OBJ_FROM_PTR(&mp_stream_unbuffered_readline_obj) }; MP_OBJ_TYPE_SET_SLOT(&decompio_type, locals_dict, (void*)&decompio_locals_dict, 2); - mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_uzlib)); + mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_zlib)); mp_store_global(MP_QSTR_decompress, MP_OBJ_FROM_PTR(&mod_uzlib_decompress_obj)); mp_store_global(MP_QSTR_DecompIO, MP_OBJ_FROM_PTR(&decompio_type)); diff --git a/extmod/modbluetooth.c b/extmod/modbluetooth.c index e65851d6b4..35ba745e31 100644 --- a/extmod/modbluetooth.c +++ b/extmod/modbluetooth.c @@ -985,7 +985,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( ); STATIC const mp_rom_map_elem_t mp_module_bluetooth_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ubluetooth) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bluetooth) }, { MP_ROM_QSTR(MP_QSTR_BLE), MP_ROM_PTR(&mp_type_bluetooth_ble) }, { MP_ROM_QSTR(MP_QSTR_UUID), MP_ROM_PTR(&mp_type_bluetooth_uuid) }, @@ -1004,7 +1004,7 @@ const mp_obj_module_t mp_module_ubluetooth = { .globals = (mp_obj_dict_t *)&mp_module_bluetooth_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ubluetooth, mp_module_ubluetooth); +MP_REGISTER_MODULE(MP_QSTR_bluetooth, mp_module_ubluetooth); // Helpers diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 734722f83a..19df1ea503 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -1802,7 +1802,7 @@ const mp_obj_module_t mp_module_lwip = { MP_REGISTER_MODULE(MP_QSTR_lwip, mp_module_lwip); // On LWIP-ports, this is the usocket module (replaces extmod/modusocket.c). -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_lwip); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_lwip); MP_REGISTER_ROOT_POINTER(mp_obj_t lwip_slip_stream); diff --git a/extmod/modubinascii.c b/extmod/modubinascii.c index 45a39c58d4..85205bc3d1 100644 --- a/extmod/modubinascii.c +++ b/extmod/modubinascii.c @@ -184,7 +184,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_binascii_crc32_obj, 1, 2, mod_bin #endif STATIC const mp_rom_map_elem_t mp_module_binascii_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ubinascii) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_binascii) }, #if MICROPY_PY_BUILTINS_BYTES_HEX { MP_ROM_QSTR(MP_QSTR_hexlify), MP_ROM_PTR(&bytes_hex_as_bytes_obj) }, { MP_ROM_QSTR(MP_QSTR_unhexlify), MP_ROM_PTR(&bytes_fromhex_obj) }, @@ -203,6 +203,6 @@ const mp_obj_module_t mp_module_ubinascii = { .globals = (mp_obj_dict_t *)&mp_module_binascii_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ubinascii, mp_module_ubinascii); +MP_REGISTER_MODULE(MP_QSTR_binascii, mp_module_ubinascii); #endif // MICROPY_PY_UBINASCII diff --git a/extmod/moducryptolib.c b/extmod/moducryptolib.c index fc3fcfd90d..730ae4c6f5 100644 --- a/extmod/moducryptolib.c +++ b/extmod/moducryptolib.c @@ -357,7 +357,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( ); STATIC const mp_rom_map_elem_t mp_module_ucryptolib_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ucryptolib) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_cryptolib) }, { MP_ROM_QSTR(MP_QSTR_aes), MP_ROM_PTR(&ucryptolib_aes_type) }, #if MICROPY_PY_UCRYPTOLIB_CONSTS { MP_ROM_QSTR(MP_QSTR_MODE_ECB), MP_ROM_INT(UCRYPTOLIB_MODE_ECB) }, @@ -375,6 +375,6 @@ const mp_obj_module_t mp_module_ucryptolib = { .globals = (mp_obj_dict_t *)&mp_module_ucryptolib_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ucryptolib, mp_module_ucryptolib); +MP_REGISTER_MODULE(MP_QSTR_cryptolib, mp_module_ucryptolib); #endif // MICROPY_PY_UCRYPTOLIB diff --git a/extmod/moduhashlib.c b/extmod/moduhashlib.c index 64e15c444d..addf094765 100644 --- a/extmod/moduhashlib.c +++ b/extmod/moduhashlib.c @@ -355,7 +355,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( #endif // MICROPY_PY_UHASHLIB_MD5 STATIC const mp_rom_map_elem_t mp_module_uhashlib_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uhashlib) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) }, #if MICROPY_PY_UHASHLIB_SHA256 { MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&uhashlib_sha256_type) }, #endif @@ -374,6 +374,6 @@ const mp_obj_module_t mp_module_uhashlib = { .globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uhashlib, mp_module_uhashlib); +MP_REGISTER_MODULE(MP_QSTR_hashlib, mp_module_uhashlib); #endif // MICROPY_PY_UHASHLIB diff --git a/extmod/moduheapq.c b/extmod/moduheapq.c index bfa6ba608d..9c3df65258 100644 --- a/extmod/moduheapq.c +++ b/extmod/moduheapq.c @@ -105,7 +105,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_uheapq_heapify_obj, mod_uheapq_heapify); #if !MICROPY_ENABLE_DYNRUNTIME STATIC const mp_rom_map_elem_t mp_module_uheapq_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uheapq) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_heapq) }, { MP_ROM_QSTR(MP_QSTR_heappush), MP_ROM_PTR(&mod_uheapq_heappush_obj) }, { MP_ROM_QSTR(MP_QSTR_heappop), MP_ROM_PTR(&mod_uheapq_heappop_obj) }, { MP_ROM_QSTR(MP_QSTR_heapify), MP_ROM_PTR(&mod_uheapq_heapify_obj) }, @@ -118,7 +118,7 @@ const mp_obj_module_t mp_module_uheapq = { .globals = (mp_obj_dict_t *)&mp_module_uheapq_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uheapq, mp_module_uheapq); +MP_REGISTER_MODULE(MP_QSTR_heapq, mp_module_uheapq); #endif #endif // MICROPY_PY_UHEAPQ diff --git a/extmod/modujson.c b/extmod/modujson.c index 4e992e2245..106595aab6 100644 --- a/extmod/modujson.c +++ b/extmod/modujson.c @@ -367,7 +367,7 @@ STATIC mp_obj_t mod_ujson_loads(mp_obj_t obj) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_loads_obj, mod_ujson_loads); STATIC const mp_rom_map_elem_t mp_module_ujson_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ujson) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_json) }, { MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_ujson_dump_obj) }, { MP_ROM_QSTR(MP_QSTR_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) }, { MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) }, @@ -381,6 +381,6 @@ const mp_obj_module_t mp_module_ujson = { .globals = (mp_obj_dict_t *)&mp_module_ujson_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ujson, mp_module_ujson); +MP_REGISTER_MODULE(MP_QSTR_json, mp_module_ujson); #endif // MICROPY_PY_UJSON diff --git a/extmod/moduos.c b/extmod/moduos.c index a245ae7283..a7d15ef966 100644 --- a/extmod/moduos.c +++ b/extmod/moduos.c @@ -122,7 +122,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_uos_uname_obj, mp_uos_uname); #endif STATIC const mp_rom_map_elem_t os_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) }, #if MICROPY_PY_UOS_GETENV_PUTENV_UNSETENV { MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mp_uos_getenv_obj) }, @@ -141,7 +141,7 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = { #if MICROPY_PY_UOS_UNAME { MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&mp_uos_uname_obj) }, #endif - #if MICROPY_PY_UOS_URANDOM + #if MICROPY_PY_OS_URANDOM { MP_ROM_QSTR(MP_QSTR_urandom), MP_ROM_PTR(&mp_uos_urandom_obj) }, #endif @@ -195,6 +195,6 @@ const mp_obj_module_t mp_module_uos = { .globals = (mp_obj_dict_t *)&os_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos); +MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos); #endif // MICROPY_PY_UOS diff --git a/extmod/moduplatform.c b/extmod/moduplatform.c index 1b35b08aa7..079e275362 100644 --- a/extmod/moduplatform.c +++ b/extmod/moduplatform.c @@ -62,7 +62,7 @@ STATIC mp_obj_t platform_libc_ver(size_t n_args, const mp_obj_t *pos_args, mp_ma STATIC MP_DEFINE_CONST_FUN_OBJ_KW(platform_libc_ver_obj, 0, platform_libc_ver); STATIC const mp_rom_map_elem_t modplatform_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uplatform) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_platform) }, { MP_ROM_QSTR(MP_QSTR_platform), MP_ROM_PTR(&platform_platform_obj) }, { MP_ROM_QSTR(MP_QSTR_python_compiler), MP_ROM_PTR(&platform_python_compiler_obj) }, { MP_ROM_QSTR(MP_QSTR_libc_ver), MP_ROM_PTR(&platform_libc_ver_obj) }, @@ -75,6 +75,6 @@ const mp_obj_module_t mp_module_uplatform = { .globals = (mp_obj_dict_t *)&modplatform_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uplatform, mp_module_uplatform); +MP_REGISTER_MODULE(MP_QSTR_platform, mp_module_uplatform); #endif // MICROPY_PY_UPLATFORM diff --git a/extmod/modurandom.c b/extmod/modurandom.c index b661627190..6b59c0ae39 100644 --- a/extmod/modurandom.c +++ b/extmod/modurandom.c @@ -231,7 +231,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_urandom___init___obj, mod_urandom___init__) #if !MICROPY_ENABLE_DYNRUNTIME STATIC const mp_rom_map_elem_t mp_module_urandom_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_urandom) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_random) }, #if SEED_ON_IMPORT { MP_ROM_QSTR(MP_QSTR___init__), MP_ROM_PTR(&mod_urandom___init___obj) }, #endif @@ -255,7 +255,7 @@ const mp_obj_module_t mp_module_urandom = { .globals = (mp_obj_dict_t *)&mp_module_urandom_globals, }; -MP_REGISTER_MODULE(MP_QSTR_urandom, mp_module_urandom); +MP_REGISTER_MODULE(MP_QSTR_random, mp_module_urandom); #endif #endif // MICROPY_PY_URANDOM diff --git a/extmod/modure.c b/extmod/modure.c index 801e5df897..c27125bf1c 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -414,7 +414,7 @@ STATIC MP_DEFINE_CONST_DICT(re_locals_dict, re_locals_dict_table); STATIC MP_DEFINE_CONST_OBJ_TYPE( re_type, - MP_QSTR_ure, + MP_QSTR_re, MP_TYPE_FLAG_NONE, print, re_print, locals_dict, &re_locals_dict @@ -451,7 +451,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_compile_obj, 1, 2, mod_re_compile); #if !MICROPY_ENABLE_DYNRUNTIME STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ure) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_re) }, { MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) }, { MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) }, { MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) }, @@ -470,7 +470,7 @@ const mp_obj_module_t mp_module_ure = { .globals = (mp_obj_dict_t *)&mp_module_re_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ure, mp_module_ure); +MP_REGISTER_MODULE(MP_QSTR_re, mp_module_ure); #endif // Source files #include'd here to make sure they're compiled in diff --git a/extmod/moduselect.c b/extmod/moduselect.c index 128154a4b6..4df0f4d561 100644 --- a/extmod/moduselect.c +++ b/extmod/moduselect.c @@ -355,7 +355,7 @@ STATIC mp_obj_t select_poll(void) { MP_DEFINE_CONST_FUN_OBJ_0(mp_select_poll_obj, select_poll); STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) }, #if MICROPY_PY_USELECT_SELECT { MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) }, #endif @@ -373,6 +373,6 @@ const mp_obj_module_t mp_module_uselect = { .globals = (mp_obj_dict_t *)&mp_module_select_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect); +MP_REGISTER_MODULE(MP_QSTR_select, mp_module_uselect); #endif // MICROPY_PY_USELECT diff --git a/extmod/modusocket.c b/extmod/modusocket.c index 2aa6010884..6d14ebdfb0 100644 --- a/extmod/modusocket.c +++ b/extmod/modusocket.c @@ -616,7 +616,7 @@ STATIC mp_obj_t mod_usocket_getaddrinfo(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_usocket_getaddrinfo_obj, 2, 6, mod_usocket_getaddrinfo); STATIC const mp_rom_map_elem_t mp_module_usocket_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) }, { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) }, { MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_usocket_getaddrinfo_obj) }, @@ -653,6 +653,6 @@ const mp_obj_module_t mp_module_usocket = { .globals = (mp_obj_dict_t *)&mp_module_usocket_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket); #endif // MICROPY_PY_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c index 77e942ec12..393a945fac 100644 --- a/extmod/modussl_axtls.c +++ b/extmod/modussl_axtls.c @@ -316,9 +316,9 @@ STATIC const mp_stream_p_t ussl_socket_stream_p = { STATIC MP_DEFINE_CONST_OBJ_TYPE( ussl_socket_type, - MP_QSTR_ussl, - MP_TYPE_FLAG_NONE, // Save on qstr's, reuse same as for module + MP_QSTR_ssl, + MP_TYPE_FLAG_NONE, print, ussl_socket_print, protocol, &ussl_socket_stream_p, locals_dict, &ussl_socket_locals_dict @@ -346,7 +346,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 1, mod_ssl_wrap_socket); STATIC const mp_rom_map_elem_t mp_module_ssl_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) }, { MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) }, }; @@ -357,6 +357,6 @@ const mp_obj_module_t mp_module_ussl = { .globals = (mp_obj_dict_t *)&mp_module_ssl_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl); +MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl); #endif // MICROPY_PY_USSL && MICROPY_SSL_AXTLS diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c index 74a59fdb67..c12c943d8a 100644 --- a/extmod/modussl_mbedtls.c +++ b/extmod/modussl_mbedtls.c @@ -461,9 +461,9 @@ STATIC const mp_stream_p_t ussl_socket_stream_p = { STATIC MP_DEFINE_CONST_OBJ_TYPE( ussl_socket_type, - MP_QSTR_ussl, - MP_TYPE_FLAG_NONE, // Save on qstr's, reuse same as for module + MP_QSTR_ssl, + MP_TYPE_FLAG_NONE, print, socket_print, protocol, &ussl_socket_stream_p, locals_dict, &ussl_socket_locals_dict @@ -493,7 +493,7 @@ STATIC mp_obj_t mod_ssl_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 1, mod_ssl_wrap_socket); STATIC const mp_rom_map_elem_t mp_module_ssl_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) }, { MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) }, { MP_ROM_QSTR(MP_QSTR_CERT_NONE), MP_ROM_INT(MBEDTLS_SSL_VERIFY_NONE) }, { MP_ROM_QSTR(MP_QSTR_CERT_OPTIONAL), MP_ROM_INT(MBEDTLS_SSL_VERIFY_OPTIONAL) }, @@ -507,6 +507,6 @@ const mp_obj_module_t mp_module_ussl = { .globals = (mp_obj_dict_t *)&mp_module_ssl_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl); +MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl); #endif // MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS diff --git a/extmod/modutime.c b/extmod/modutime.c index d82ac6a27c..5d8148f98a 100644 --- a/extmod/modutime.c +++ b/extmod/modutime.c @@ -197,7 +197,7 @@ STATIC mp_obj_t time_ticks_add(mp_obj_t ticks_in, mp_obj_t delta_in) { MP_DEFINE_CONST_FUN_OBJ_2(mp_utime_ticks_add_obj, time_ticks_add); STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utime) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_time) }, #if MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME { MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&mp_utime_localtime_obj) }, @@ -231,6 +231,6 @@ const mp_obj_module_t mp_module_utime = { .globals = (mp_obj_dict_t *)&mp_module_time_globals, }; -MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime); +MP_REGISTER_MODULE(MP_QSTR_time, mp_module_utime); #endif // MICROPY_PY_UTIME diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c index 1a38104eaf..4aa572934f 100644 --- a/extmod/modutimeq.c +++ b/extmod/modutimeq.c @@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_DICT(utimeq_locals_dict, utimeq_locals_dict_table); STATIC MP_DEFINE_CONST_OBJ_TYPE( utimeq_type, - MP_QSTR_utimeq, + MP_QSTR_timeq, MP_TYPE_FLAG_NONE, make_new, utimeq_make_new, unary_op, utimeq_unary_op, @@ -219,8 +219,8 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( ); STATIC const mp_rom_map_elem_t mp_module_utimeq_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utimeq) }, - { MP_ROM_QSTR(MP_QSTR_utimeq), MP_ROM_PTR(&utimeq_type) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_timeq) }, + { MP_ROM_QSTR(MP_QSTR_timeq), MP_ROM_PTR(&utimeq_type) }, }; STATIC MP_DEFINE_CONST_DICT(mp_module_utimeq_globals, mp_module_utimeq_globals_table); @@ -230,6 +230,6 @@ const mp_obj_module_t mp_module_utimeq = { .globals = (mp_obj_dict_t *)&mp_module_utimeq_globals, }; -MP_REGISTER_MODULE(MP_QSTR_utimeq, mp_module_utimeq); +MP_REGISTER_MODULE(MP_QSTR_timeq, mp_module_utimeq); #endif // MICROPY_PY_UTIMEQ diff --git a/extmod/moduwebsocket.c b/extmod/moduwebsocket.c index 9b12fc8635..ca7152bb13 100644 --- a/extmod/moduwebsocket.c +++ b/extmod/moduwebsocket.c @@ -300,7 +300,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( ); STATIC const mp_rom_map_elem_t uwebsocket_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uwebsocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_websocket) }, { MP_ROM_QSTR(MP_QSTR_websocket), MP_ROM_PTR(&websocket_type) }, }; @@ -311,6 +311,6 @@ const mp_obj_module_t mp_module_uwebsocket = { .globals = (mp_obj_dict_t *)&uwebsocket_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uwebsocket, mp_module_uwebsocket); +MP_REGISTER_MODULE(MP_QSTR_websocket, mp_module_uwebsocket); #endif // MICROPY_PY_UWEBSOCKET diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index 14d15321a3..f41ca2b012 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_u #if !MICROPY_ENABLE_DYNRUNTIME STATIC const mp_rom_map_elem_t mp_module_uzlib_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uzlib) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_zlib) }, { MP_ROM_QSTR(MP_QSTR_decompress), MP_ROM_PTR(&mod_uzlib_decompress_obj) }, { MP_ROM_QSTR(MP_QSTR_DecompIO), MP_ROM_PTR(&decompio_type) }, }; @@ -224,7 +224,7 @@ const mp_obj_module_t mp_module_uzlib = { }; -MP_REGISTER_MODULE(MP_QSTR_uzlib, mp_module_uzlib); +MP_REGISTER_MODULE(MP_QSTR_zlib, mp_module_uzlib); #endif // Source files #include'd here to make sure they're compiled in diff --git a/ports/cc3200/mods/modmachine.c b/ports/cc3200/mods/modmachine.c index 3e483e0a23..c5b06f5077 100644 --- a/ports/cc3200/mods/modmachine.c +++ b/ports/cc3200/mods/modmachine.c @@ -162,7 +162,7 @@ STATIC mp_obj_t machine_wake_reason (void) { STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_wake_reason_obj, machine_wake_reason); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, #ifdef DEBUG @@ -214,5 +214,5 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t*)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); MP_REGISTER_ROOT_POINTER(mp_obj_t machine_config_main); diff --git a/ports/cc3200/mods/moduhashlib.c b/ports/cc3200/mods/moduhashlib.c index 302ff335ff..5424a6c0fb 100644 --- a/ports/cc3200/mods/moduhashlib.c +++ b/ports/cc3200/mods/moduhashlib.c @@ -194,7 +194,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( ); STATIC const mp_rom_map_elem_t mp_module_hashlib_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uhashlib) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) }, //{ MP_ROM_QSTR(MP_QSTR_md5), MP_ROM_PTR(&md5_type) }, { MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&sha1_type) }, { MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&sha256_type) }, diff --git a/ports/cc3200/mods/moduos.c b/ports/cc3200/mods/moduos.c index e284e9eb1f..b3f3bbf8d8 100644 --- a/ports/cc3200/mods/moduos.c +++ b/ports/cc3200/mods/moduos.c @@ -146,7 +146,7 @@ STATIC mp_obj_t os_dupterm(uint n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(os_dupterm_obj, 0, 1, os_dupterm); STATIC const mp_rom_map_elem_t os_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) }, { MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&os_uname_obj) }, @@ -180,4 +180,4 @@ const mp_obj_module_t mp_module_uos = { .globals = (mp_obj_dict_t*)&os_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos); +MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos); diff --git a/ports/cc3200/mods/modusocket.c b/ports/cc3200/mods/modusocket.c index cd1489fb4a..311a4395fb 100644 --- a/ports/cc3200/mods/modusocket.c +++ b/ports/cc3200/mods/modusocket.c @@ -795,7 +795,7 @@ STATIC mp_obj_t mod_usocket_getaddrinfo(mp_obj_t host_in, mp_obj_t port_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_usocket_getaddrinfo_obj, mod_usocket_getaddrinfo); STATIC const mp_rom_map_elem_t mp_module_usocket_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) }, { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) }, { MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_usocket_getaddrinfo_obj) }, @@ -818,4 +818,4 @@ const mp_obj_module_t mp_module_usocket = { .globals = (mp_obj_dict_t*)&mp_module_usocket_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket); diff --git a/ports/cc3200/mods/modussl.c b/ports/cc3200/mods/modussl.c index 118cbd06f8..e2de7b05cb 100644 --- a/ports/cc3200/mods/modussl.c +++ b/ports/cc3200/mods/modussl.c @@ -62,7 +62,7 @@ STATIC const mp_obj_type_t ssl_socket_type; // locals and stream methods STATIC MP_DEFINE_CONST_OBJ_TYPE( ssl_socket_type, - MP_QSTR_ussl, + MP_QSTR_ssl, MP_TYPE_FLAG_NONE, protocol, &socket_stream_p, locals_dict, &socket_locals_dict @@ -136,7 +136,7 @@ arg_error: STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_ssl_wrap_socket_obj, 0, mod_ssl_wrap_socket); STATIC const mp_rom_map_elem_t mp_module_ussl_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ussl) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ssl) }, { MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&mod_ssl_wrap_socket_obj) }, // class exceptions @@ -160,4 +160,4 @@ const mp_obj_module_t mp_module_ussl = { .globals = (mp_obj_dict_t*)&mp_module_ussl_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl); +MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ussl); diff --git a/ports/cc3200/mpconfigport.h b/ports/cc3200/mpconfigport.h index cb71a28f34..6bdaa9b553 100644 --- a/ports/cc3200/mpconfigport.h +++ b/ports/cc3200/mpconfigport.h @@ -136,7 +136,7 @@ // extra constants #define MICROPY_PORT_CONSTANTS \ - { MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \ + { MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \ #define MP_STATE_PORT MP_STATE_VM diff --git a/ports/esp32/modmachine.c b/ports/esp32/modmachine.c index 37d4f424d4..a863f716c7 100644 --- a/ports/esp32/modmachine.c +++ b/ports/esp32/modmachine.c @@ -272,7 +272,7 @@ STATIC mp_obj_t machine_enable_irq(mp_obj_t state_in) { MP_DEFINE_CONST_FUN_OBJ_1(machine_enable_irq_obj, machine_enable_irq); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) }, { MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) }, @@ -353,6 +353,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/esp32/modsocket.c b/ports/esp32/modsocket.c index 9812eb3476..5e07d1f4f5 100644 --- a/ports/esp32/modsocket.c +++ b/ports/esp32/modsocket.c @@ -844,7 +844,7 @@ STATIC mp_obj_t esp_socket_initialize() { STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_socket_initialize_obj, esp_socket_initialize); STATIC const mp_rom_map_elem_t mp_module_socket_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) }, { MP_ROM_QSTR(MP_QSTR___init__), MP_ROM_PTR(&esp_socket_initialize_obj) }, { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) }, { MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&esp_socket_getaddrinfo_obj) }, @@ -872,4 +872,4 @@ const mp_obj_module_t mp_module_usocket = { // Note: This port doesn't define MICROPY_PY_USOCKET or MICROPY_PY_LWIP so // this will not conflict with the common implementation provided by // extmod/mod{lwip,usocket}.c. -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket); diff --git a/ports/esp8266/modmachine.c b/ports/esp8266/modmachine.c index 3c75a2d7ff..383f46dda7 100644 --- a/ports/esp8266/modmachine.c +++ b/ports/esp8266/modmachine.c @@ -396,7 +396,7 @@ mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t } STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) }, { MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) }, { MP_ROM_QSTR(MP_QSTR_mem32), MP_ROM_PTR(&machine_mem32_obj) }, @@ -456,6 +456,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/mimxrt/modmachine.c b/ports/mimxrt/modmachine.c index 7b00470cca..098c3b949a 100644 --- a/ports/mimxrt/modmachine.c +++ b/ports/mimxrt/modmachine.c @@ -130,7 +130,7 @@ NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_bootloader_obj, 0, 1, machine_bootloader); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) }, { MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, @@ -185,6 +185,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/nrf/modules/machine/modmachine.c b/ports/nrf/modules/machine/modmachine.c index b080a526cf..b7cbdc7b2d 100644 --- a/ports/nrf/modules/machine/modmachine.c +++ b/ports/nrf/modules/machine/modmachine.c @@ -205,7 +205,7 @@ STATIC mp_obj_t machine_disable_irq(void) { MP_DEFINE_CONST_FUN_OBJ_0(machine_disable_irq_obj, machine_disable_irq); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, { MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) }, @@ -266,6 +266,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t*)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/nrf/modules/uos/moduos.c b/ports/nrf/modules/uos/moduos.c index 402096aacd..bb49012707 100644 --- a/ports/nrf/modules/uos/moduos.c +++ b/ports/nrf/modules/uos/moduos.c @@ -138,7 +138,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_dupterm_obj, 0, 1, os_dupterm); #endif // MICROPY_PY_MACHINE_UART STATIC const mp_rom_map_elem_t os_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) }, { MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&os_uname_obj) }, @@ -197,4 +197,4 @@ const mp_obj_module_t mp_module_uos = { .globals = (mp_obj_dict_t*)&os_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos); +MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos); diff --git a/ports/qemu-arm/modmachine.c b/ports/qemu-arm/modmachine.c index 515452f41d..1f9151ff74 100644 --- a/ports/qemu-arm/modmachine.c +++ b/ports/qemu-arm/modmachine.c @@ -31,7 +31,7 @@ #if MICROPY_PY_MACHINE STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) }, { MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) }, @@ -48,6 +48,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/renesas-ra/README.md b/ports/renesas-ra/README.md index 896d465d2d..1e5e2ed0cf 100644 --- a/ports/renesas-ra/README.md +++ b/ports/renesas-ra/README.md @@ -4,8 +4,8 @@ This is a port of MicroPython to the Renesas RA family of microcontrollers. Currently supported features are: - Filesystem on the internal flash using FatFs. -- `utime` module with sleep, time, and ticks functions. -- `uos` module with VFS support. +- `time` module with sleep, time, and ticks functions. +- `os` module with VFS support. - `machine` module with the following classes: `Pin`, `ADC`, `I2C`, `SPI`, `SoftI2C`, `SoftSPI`, `UART`, `RTC` - sdcard driver if frozen driver is installed. diff --git a/ports/renesas-ra/modmachine.c b/ports/renesas-ra/modmachine.c index ecb028983c..07e6103aaa 100644 --- a/ports/renesas-ra/modmachine.c +++ b/ports/renesas-ra/modmachine.c @@ -251,7 +251,7 @@ STATIC mp_obj_t machine_reset_cause(void) { STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) }, { MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, @@ -307,6 +307,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/renesas-ra/mpconfigport.h b/ports/renesas-ra/mpconfigport.h index 7dbe941c0e..42834c1fbc 100644 --- a/ports/renesas-ra/mpconfigport.h +++ b/ports/renesas-ra/mpconfigport.h @@ -139,7 +139,7 @@ #if MICROPY_PY_MACHINE #define MACHINE_BUILTIN_MODULE_CONSTANTS \ - { MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \ + { MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \ { MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, #else #define MACHINE_BUILTIN_MODULE_CONSTANTS diff --git a/ports/rp2/README.md b/ports/rp2/README.md index 078919ce81..3f152b8181 100644 --- a/ports/rp2/README.md +++ b/ports/rp2/README.md @@ -6,8 +6,8 @@ Currently supported features are: - REPL over USB VCP, and optionally over UART (on GP0/GP1). - Filesystem on the internal flash, using littlefs2. - Support for native code generation and inline assembler. -- `utime` module with sleep, time and ticks functions. -- `uos` module with VFS support. +- `time` module with sleep, time and ticks functions. +- `os` module with VFS support. - `machine` module with the following classes: `Pin`, `ADC`, `PWM`, `I2C`, `SPI`, `SoftI2C`, `SoftSPI`, `Timer`, `UART`, `WDT`. - `rp2` module with programmable IO (PIO) support. diff --git a/ports/rp2/modmachine.c b/ports/rp2/modmachine.c index 81154c94ce..61b91bda0a 100644 --- a/ports/rp2/modmachine.c +++ b/ports/rp2/modmachine.c @@ -229,7 +229,7 @@ STATIC mp_obj_t machine_enable_irq(mp_obj_t state_in) { MP_DEFINE_CONST_FUN_OBJ_1(machine_enable_irq_obj, machine_enable_irq); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) }, { MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, @@ -278,6 +278,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/samd/modmachine.c b/ports/samd/modmachine.c index 58ca895b45..7e231b28b4 100644 --- a/ports/samd/modmachine.c +++ b/ports/samd/modmachine.c @@ -224,7 +224,7 @@ STATIC mp_obj_t machine_lightsleep(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lightsleep_obj, 0, 1, machine_lightsleep); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, { MP_ROM_QSTR(MP_QSTR_bootloader), MP_ROM_PTR(&machine_bootloader_obj) }, @@ -297,6 +297,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/stm32/modmachine.c b/ports/stm32/modmachine.c index dee9689e3b..e6eb73f9cb 100644 --- a/ports/stm32/modmachine.c +++ b/ports/stm32/modmachine.c @@ -386,7 +386,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_reset_cause_obj, machine_reset_cause); #if MICROPY_PY_MACHINE STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) }, { MP_ROM_QSTR(MP_QSTR_unique_id), MP_ROM_PTR(&machine_unique_id_obj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, @@ -471,6 +471,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index fd5254082d..62784dccf1 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -170,7 +170,7 @@ extern const struct _mp_obj_module_t stm_module; #if MICROPY_PY_MACHINE #define MACHINE_BUILTIN_MODULE_CONSTANTS \ - { MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \ + { MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, \ { MP_ROM_QSTR(MP_QSTR_machine), MP_ROM_PTR(&mp_module_machine) }, #else #define MACHINE_BUILTIN_MODULE_CONSTANTS diff --git a/ports/unix/modmachine.c b/ports/unix/modmachine.c index 542ff50025..29ac532d2b 100644 --- a/ports/unix/modmachine.c +++ b/ports/unix/modmachine.c @@ -86,7 +86,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(machine_idle_obj, machine_idle); #endif STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, { MP_ROM_QSTR(MP_QSTR_mem8), MP_ROM_PTR(&machine_mem8_obj) }, { MP_ROM_QSTR(MP_QSTR_mem16), MP_ROM_PTR(&machine_mem16_obj) }, @@ -110,6 +110,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/unix/moduselect.c b/ports/unix/moduselect.c index 8f71813e70..9b205d333f 100644 --- a/ports/unix/moduselect.c +++ b/ports/unix/moduselect.c @@ -336,7 +336,7 @@ STATIC mp_obj_t select_poll(size_t n_args, const mp_obj_t *args) { MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_poll_obj, 0, 1, select_poll); STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uselect) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) }, { MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) }, { MP_ROM_QSTR(MP_QSTR_POLLIN), MP_ROM_INT(POLLIN) }, { MP_ROM_QSTR(MP_QSTR_POLLOUT), MP_ROM_INT(POLLOUT) }, @@ -351,6 +351,6 @@ const mp_obj_module_t mp_module_uselect = { .globals = (mp_obj_dict_t *)&mp_module_select_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect); +MP_REGISTER_MODULE(MP_QSTR_select, mp_module_uselect); #endif // MICROPY_PY_USELECT_POSIX diff --git a/ports/unix/modusocket.c b/ports/unix/modusocket.c index a32fc60163..2d4eeec346 100644 --- a/ports/unix/modusocket.c +++ b/ports/unix/modusocket.c @@ -674,7 +674,7 @@ STATIC mp_obj_t mod_socket_sockaddr(mp_obj_t sockaddr_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_socket_sockaddr_obj, mod_socket_sockaddr); STATIC const mp_rom_map_elem_t mp_module_socket_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) }, { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&mp_type_socket) }, { MP_ROM_QSTR(MP_QSTR_getaddrinfo), MP_ROM_PTR(&mod_socket_getaddrinfo_obj) }, { MP_ROM_QSTR(MP_QSTR_inet_pton), MP_ROM_PTR(&mod_socket_inet_pton_obj) }, @@ -708,6 +708,6 @@ const mp_obj_module_t mp_module_socket = { .globals = (mp_obj_dict_t *)&mp_module_socket_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_socket); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket); #endif // MICROPY_PY_SOCKET diff --git a/ports/zephyr/README.md b/ports/zephyr/README.md index f9bd45344b..3de793b2fe 100644 --- a/ports/zephyr/README.md +++ b/ports/zephyr/README.md @@ -12,11 +12,11 @@ should work with MicroPython (but not all were tested). Features supported at this time: * REPL (interactive prompt) over Zephyr UART console. -* `utime` module for time measurements and delays. +* `time` module for time measurements and delays. * `machine.Pin` class for GPIO control, with IRQ support. * `machine.I2C` class for I2C control. * `machine.SPI` class for SPI control. -* `usocket` module for networking (IPv4/IPv6). +* `socket` module for networking (IPv4/IPv6). * "Frozen modules" support to allow to bundle Python modules together with firmware. Including complete applications, including with run-on-boot capability. diff --git a/ports/zephyr/modmachine.c b/ports/zephyr/modmachine.c index 95a66c5119..6f4bbbdab6 100644 --- a/ports/zephyr/modmachine.c +++ b/ports/zephyr/modmachine.c @@ -61,7 +61,7 @@ STATIC mp_obj_t machine_idle(void) { STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_idle_obj, machine_idle); STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_umachine) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_machine) }, #ifdef CONFIG_REBOOT { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, #endif @@ -89,6 +89,6 @@ const mp_obj_module_t mp_module_machine = { .globals = (mp_obj_dict_t *)&machine_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine); +MP_REGISTER_MODULE(MP_QSTR_machine, mp_module_machine); #endif // MICROPY_PY_MACHINE diff --git a/ports/zephyr/modusocket.c b/ports/zephyr/modusocket.c index c79f73a9d2..98dff7e8e8 100644 --- a/ports/zephyr/modusocket.c +++ b/ports/zephyr/modusocket.c @@ -449,7 +449,7 @@ STATIC mp_obj_t pkt_get_info(void) { STATIC MP_DEFINE_CONST_FUN_OBJ_0(pkt_get_info_obj, pkt_get_info); STATIC const mp_rom_map_elem_t mp_module_usocket_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_usocket) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_socket) }, // objects { MP_ROM_QSTR(MP_QSTR_socket), MP_ROM_PTR(&socket_type) }, // class constants @@ -473,6 +473,6 @@ const mp_obj_module_t mp_module_usocket = { .globals = (mp_obj_dict_t *)&mp_module_usocket_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket); +MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_usocket); #endif // MICROPY_PY_USOCKET diff --git a/py/modarray.c b/py/modarray.c index d9f7a04528..c91e92f798 100644 --- a/py/modarray.c +++ b/py/modarray.c @@ -29,7 +29,7 @@ #if MICROPY_PY_ARRAY STATIC const mp_rom_map_elem_t mp_module_array_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uarray) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_array) }, { MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mp_type_array) }, }; @@ -40,6 +40,6 @@ const mp_obj_module_t mp_module_uarray = { .globals = (mp_obj_dict_t *)&mp_module_array_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uarray, mp_module_uarray); +MP_REGISTER_MODULE(MP_QSTR_array, mp_module_uarray); #endif diff --git a/py/modcollections.c b/py/modcollections.c index 8c62f34db7..a56fe069ea 100644 --- a/py/modcollections.c +++ b/py/modcollections.c @@ -29,7 +29,7 @@ #if MICROPY_PY_COLLECTIONS STATIC const mp_rom_map_elem_t mp_module_collections_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ucollections) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_collections) }, #if MICROPY_PY_COLLECTIONS_DEQUE { MP_ROM_QSTR(MP_QSTR_deque), MP_ROM_PTR(&mp_type_deque) }, #endif @@ -46,6 +46,6 @@ const mp_obj_module_t mp_module_collections = { .globals = (mp_obj_dict_t *)&mp_module_collections_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ucollections, mp_module_collections); +MP_REGISTER_MODULE(MP_QSTR_collections, mp_module_collections); #endif // MICROPY_PY_COLLECTIONS diff --git a/py/modio.c b/py/modio.c index 9ec6bbcc4e..3462611d71 100644 --- a/py/modio.c +++ b/py/modio.c @@ -203,7 +203,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( #endif // MICROPY_PY_IO_BUFFEREDWRITER STATIC const mp_rom_map_elem_t mp_module_io_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uio) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_io) }, // Note: mp_builtin_open_obj should be defined by port, it's not // part of the core. { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, @@ -226,6 +226,6 @@ const mp_obj_module_t mp_module_io = { .globals = (mp_obj_dict_t *)&mp_module_io_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uio, mp_module_io); +MP_REGISTER_MODULE(MP_QSTR_io, mp_module_io); #endif diff --git a/py/modstruct.c b/py/modstruct.c index ec86d4b9c2..78c7d53e4b 100644 --- a/py/modstruct.c +++ b/py/modstruct.c @@ -251,7 +251,7 @@ STATIC mp_obj_t struct_pack_into(size_t n_args, const mp_obj_t *args) { MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(struct_pack_into_obj, 3, MP_OBJ_FUN_ARGS_MAX, struct_pack_into); STATIC const mp_rom_map_elem_t mp_module_struct_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ustruct) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_struct) }, { MP_ROM_QSTR(MP_QSTR_calcsize), MP_ROM_PTR(&struct_calcsize_obj) }, { MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&struct_pack_obj) }, { MP_ROM_QSTR(MP_QSTR_pack_into), MP_ROM_PTR(&struct_pack_into_obj) }, @@ -266,6 +266,6 @@ const mp_obj_module_t mp_module_ustruct = { .globals = (mp_obj_dict_t *)&mp_module_struct_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ustruct, mp_module_ustruct); +MP_REGISTER_MODULE(MP_QSTR_struct, mp_module_ustruct); #endif diff --git a/py/modsys.c b/py/modsys.c index 35af761a08..09bdfefc63 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -294,7 +294,7 @@ const mp_obj_module_t mp_module_sys = { .globals = (mp_obj_dict_t *)&mp_module_sys_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usys, mp_module_sys); +MP_REGISTER_MODULE(MP_QSTR_sys, mp_module_sys); // If MICROPY_PY_SYS_PATH_ARGV_DEFAULTS is not enabled then these two lists // must be initialised after the call to mp_init. diff --git a/py/moduerrno.c b/py/moduerrno.c index 1b16fd9d9e..e197f921e1 100644 --- a/py/moduerrno.c +++ b/py/moduerrno.c @@ -82,7 +82,7 @@ STATIC const mp_obj_dict_t errorcode_dict = { #endif STATIC const mp_rom_map_elem_t mp_module_uerrno_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uerrno) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_errno) }, #if MICROPY_PY_UERRNO_ERRORCODE { MP_ROM_QSTR(MP_QSTR_errorcode), MP_ROM_PTR(&errorcode_dict) }, #endif @@ -99,7 +99,7 @@ const mp_obj_module_t mp_module_uerrno = { .globals = (mp_obj_dict_t *)&mp_module_uerrno_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uerrno, mp_module_uerrno); +MP_REGISTER_MODULE(MP_QSTR_errno, mp_module_uerrno); qstr mp_errno_to_str(mp_obj_t errno_val) { #if MICROPY_PY_UERRNO_ERRORCODE