Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
7f59b4b2
Commit
7f59b4b2
authored
Apr 04, 2015
by
Paul Sokolovsky
Browse files
objstr: Fix bugs introduced by inability to have shadow variables.
Warnings lead to programming errors - as expected.
parent
acf6aec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objstr.c
View file @
7f59b4b2
...
...
@@ -519,8 +519,8 @@ STATIC inline mp_obj_t str_split_internal(mp_uint_t n_args, const mp_obj_t *args
s
++
;
}
mp_uint_t
sub_len
=
s
-
start
;
if
(
MP_LIKELY
(
!
(
len
==
0
&&
s
==
top
&&
(
type
&&
SPLITLINES
))))
{
if
(
start
+
len
!=
top
&&
(
type
&
KEEP
))
{
if
(
MP_LIKELY
(
!
(
sub_
len
==
0
&&
s
==
top
&&
(
type
&&
SPLITLINES
))))
{
if
(
start
+
sub_
len
!=
top
&&
(
type
&
KEEP
))
{
sub_len
++
;
}
mp_obj_list_append
(
res
,
mp_obj_new_str_of_type
(
self_type
,
start
,
sub_len
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment