summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-04-04 01:23:18 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-04-04 01:24:59 +0300
commitacf6aec71cef3dae4431b79f6e530d3c8994a8b4 (patch)
treed66199d5bf350230f0e8464a4378fd0dd6fe615f /py/objstr.c
parent620058cc5702e1f045e3c71f732f583334543a59 (diff)
objstr: Avoid variable shadowing.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 84f872fe2..4f032d38c 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -518,12 +518,12 @@ STATIC inline mp_obj_t str_split_internal(mp_uint_t n_args, const mp_obj_t *args
}
s++;
}
- mp_uint_t len = s - start;
+ mp_uint_t sub_len = s - start;
if (MP_LIKELY(!(len == 0 && s == top && (type && SPLITLINES)))) {
if (start + len != top && (type & KEEP)) {
- len++;
+ sub_len++;
}
- mp_obj_list_append(res, mp_obj_new_str_of_type(self_type, start, len));
+ mp_obj_list_append(res, mp_obj_new_str_of_type(self_type, start, sub_len));
}
if (s >= top) {
break;