make 'import uerrno' work again in unix port

this fixes tests that 'import uerrno'.
This commit is contained in:
Jeff Epler 2023-08-15 07:52:16 -05:00
parent f0a8d449c1
commit df1dd6ad3c
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -105,7 +105,11 @@ const mp_obj_module_t mp_module_uerrno = {
.globals = (mp_obj_dict_t *)&mp_module_uerrno_globals,
};
#if defined(MICROPY_UNIX_COVERAGE)
MP_REGISTER_MODULE(MP_QSTR_uerrno, mp_module_uerrno);
#else
MP_REGISTER_MODULE(MP_QSTR_errno, mp_module_uerrno);
#endif
qstr mp_errno_to_str(mp_obj_t errno_val) {
// Otherwise, return the Exxxx string for that error code