py: Make sure getattr() works with non-interned strings (by interning them).

This commit is contained in:
Paul Sokolovsky
2014-06-08 01:13:35 +03:00
parent d31a093f9c
commit b4efac14cd
4 changed files with 14 additions and 2 deletions

View File

@@ -468,6 +468,7 @@ uint mp_obj_str_get_len(mp_obj_t self_in);
qstr mp_obj_str_get_qstr(mp_obj_t self_in); // use this if you will anyway convert the string to a qstr
const char *mp_obj_str_get_str(mp_obj_t self_in); // use this only if you need the string to be null terminated
const char *mp_obj_str_get_data(mp_obj_t self_in, uint *len);
mp_obj_t mp_obj_str_intern(mp_obj_t str);
void mp_str_print_quoted(void (*print)(void *env, const char *fmt, ...), void *env, const byte *str_data, uint str_len);
#if MICROPY_PY_BUILTINS_FLOAT