commit | f130ca1f60fbbca95516b722ce0119e5f3ca2767 | [log] [tgz] |
---|---|---|
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Apr 13 05:41:00 2014 +0300 |
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Apr 13 06:45:12 2014 +0300 |
tree | 0c50e96b2f8ce3a02f0786510a80f676629a6325 | |
parent | 73b7027b8330ea813c4ba83f074bc8937a952d9c [diff] [blame] |
py: Make bytes type hashable.
diff --git a/py/objstr.c b/py/objstr.c index 12627d3..d933fa5 100644 --- a/py/objstr.c +++ b/py/objstr.c
@@ -1480,7 +1480,8 @@ } 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 {