uhashlib: masquerade as hashlib for python3 compatibility
This commit is contained in:
parent
005226ae54
commit
11a97bdffe
|
@ -149,7 +149,7 @@ STATIC const mp_obj_type_t sha1_type = {
|
|||
#endif
|
||||
|
||||
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_sha256), MP_ROM_PTR(&sha256_type) },
|
||||
#if MICROPY_PY_UHASHLIB_SHA1
|
||||
{ MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&sha1_type) },
|
||||
|
|
|
@ -199,7 +199,7 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_utimeq), MP_ROM_PTR(&mp_module_utimeq) },
|
||||
#endif
|
||||
#if MICROPY_PY_UHASHLIB
|
||||
{ MP_ROM_QSTR(MP_QSTR_uhashlib), MP_ROM_PTR(&mp_module_uhashlib) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_hashlib), MP_ROM_PTR(&mp_module_uhashlib) },
|
||||
#endif
|
||||
#if MICROPY_PY_UBINASCII
|
||||
{ MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
|
||||
|
|
Loading…
Reference in New Issue