diff options
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c index 12627d3cd1..d933fa5e34 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -1480,7 +1480,8 @@ STATIC void bad_implicit_conversion(mp_obj_t self_in) { } uint mp_obj_str_get_hash(mp_obj_t self_in) { - if (MP_OBJ_IS_STR(self_in)) { + // TODO: This has too big overhead for hash accessor + if (MP_OBJ_IS_STR(self_in) || MP_OBJ_IS_TYPE(self_in, &mp_type_bytes)) { GET_STR_HASH(self_in, h); return h; } else { |