diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-04 13:23:44 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-04 13:23:44 +0200 |
commit | ff8e35b42ec9fbf2ab18d777a232b953ccd1f14c (patch) | |
tree | 9dfd0b12268b0badf1df3cb067dbefe0ab8afd1c | |
parent | c1144966417de643d86286dae3189e8c0e09d9c2 (diff) | |
download | micropython-ff8e35b42ec9fbf2ab18d777a232b953ccd1f14c.tar.gz micropython-ff8e35b42ec9fbf2ab18d777a232b953ccd1f14c.zip |
objstr: Common subexpression elimination for vstr_str(field_name).
-rw-r--r-- | py/objstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c index 8d05ae8c9f..688988c019 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -944,7 +944,7 @@ mp_obj_t mp_obj_str_format(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwa "can't switch from automatic field numbering to manual field specification")); } } - lookup = str_to_int(vstr_str(field_name), &index) + field; + lookup = str_to_int(field, &index) + field; if (index >= n_args - 1) { nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, "tuple index out of range")); } |