extmod: Make extmod modules use MP_REGISTER_MODULE.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2022-04-20 16:06:22 +10:00
parent 469450171f
commit 4eab44a1ec
35 changed files with 69 additions and 74 deletions

View File

@@ -99,6 +99,8 @@ 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, MICROPY_PY_UERRNO);
qstr mp_errno_to_str(mp_obj_t errno_val) {
#if MICROPY_PY_UERRNO_ERRORCODE
// We have the errorcode dict so can do a lookup using the hash map