Skip to content

Commit db1e10d

Browse files
committed
py: Use SMALL_INT creation macro in builtin sum.
1 parent 96e37d3 commit db1e10d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/modbuiltins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ STATIC mp_obj_t mp_builtin_sum(mp_uint_t n_args, const mp_obj_t *args) {
492492
assert(1 <= n_args && n_args <= 2);
493493
mp_obj_t value;
494494
switch (n_args) {
495-
case 1: value = mp_obj_new_int(0); break;
495+
case 1: value = MP_OBJ_NEW_SMALL_INT(0); break;
496496
default: value = args[1]; break;
497497
}
498498
mp_obj_t iterable = mp_getiter(args[0]);

0 commit comments

Comments
 (0)