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
94792dd8
Commit
94792dd8
authored
Apr 28, 2015
by
Daniel Campora
Browse files
py: In attrtuple use the correct length value and index for 'fields'.
parent
5225e29c
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objattrtuple.c
View file @
94792dd8
...
...
@@ -34,7 +34,7 @@ STATIC
#endif
void
mp_obj_attrtuple_print_helper
(
const
mp_print_t
*
print
,
const
qstr
*
fields
,
mp_obj_tuple_t
*
o
)
{
mp_print_str
(
print
,
"("
);
for
(
mp_uint_t
i
=
0
;
i
<
o
->
len
;
i
++
)
{
for
(
mp_uint_t
i
=
0
;
i
<
(
o
->
len
-
1
)
;
i
++
)
{
if
(
i
>
0
)
{
mp_print_str
(
print
,
", "
);
}
...
...
@@ -51,7 +51,7 @@ void mp_obj_attrtuple_print_helper(const mp_print_t *print, const qstr *fields,
STATIC
void
mp_obj_attrtuple_print
(
const
mp_print_t
*
print
,
mp_obj_t
o_in
,
mp_print_kind_t
kind
)
{
(
void
)
kind
;
mp_obj_tuple_t
*
o
=
o_in
;
const
qstr
*
fields
=
(
const
qstr
*
)
o
->
items
[
o
->
len
];
const
qstr
*
fields
=
(
const
qstr
*
)
o
->
items
[
o
->
len
-
1
];
mp_obj_attrtuple_print_helper
(
print
,
fields
,
o
);
}
...
...
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