8000 py: Fix emitnative's creation of small ints so it uses the macro. · micropython/micropython@2686f9b · GitHub
[go: up one dir, main page]

Skip to content

Commit 2686f9b

Browse files
committed
py: Fix emitnative's creation of small ints so it uses the macro.
1 parent d460a30 commit 2686f9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/emitnative.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ STATIC void emit_native_load_const_small_int(emit_t *emit, mp_int_t arg) {
11251125
if (emit->do_viper_types) {
11261126
emit_post_push_imm(emit, VTYPE_INT, arg);
11271127
} else {
1128-
emit_post_push_imm(emit, VTYPE_PYOBJ, (arg << 1) | 1);
1128+
emit_post_push_imm(emit, VTYPE_PYOBJ, (mp_uint_t)MP_OBJ_NEW_SMALL_INT(arg));
11291129
}
11301130
}
11311131

0 commit comments

Comments
 (0)
0