summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-04 13:23:44 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-01-04 13:23:44 +0200
commitff8e35b42ec9fbf2ab18d777a232b953ccd1f14c (patch)
tree9dfd0b12268b0badf1df3cb067dbefe0ab8afd1c
parentc1144966417de643d86286dae3189e8c0e09d9c2 (diff)
downloadmicropython-ff8e35b42ec9fbf2ab18d777a232b953ccd1f14c.tar.gz
micropython-ff8e35b42ec9fbf2ab18d777a232b953ccd1f14c.zip
objstr: Common subexpression elimination for vstr_str(field_name).
-rw-r--r--py/objstr.c2
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"));
}