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
db1e10d5
Commit
db1e10d5
authored
Mar 02, 2015
by
Damien George
Browse files
py: Use SMALL_INT creation macro in builtin sum.
parent
96e37d3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/modbuiltins.c
View file @
db1e10d5
...
...
@@ -492,7 +492,7 @@ STATIC mp_obj_t mp_builtin_sum(mp_uint_t n_args, const mp_obj_t *args) {
assert
(
1
<=
n_args
&&
n_args
<=
2
);
mp_obj_t
value
;
switch
(
n_args
)
{
case
1
:
value
=
mp_obj_new_int
(
0
);
break
;
case
1
:
value
=
MP_OBJ_NEW_SMALL_INT
(
0
);
break
;
default:
value
=
args
[
1
];
break
;
}
mp_obj_t
iterable
=
mp_getiter
(
args
[
0
]);
...
...
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