diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-01 00:12:43 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-01 00:12:43 +0100 |
commit | 2686f9b3e8ada0f32a095ab552b0b64602a1225c (patch) | |
tree | 2f2da0f752ed75c05a91c7f4d36e0e0ff92c7e23 /py/emitnative.c | |
parent | d460a307114285c675846bc4be2a57b59c06c11a (diff) | |
download | micropython-2686f9b3e8ada0f32a095ab552b0b64602a1225c.tar.gz micropython-2686f9b3e8ada0f32a095ab552b0b64602a1225c.zip |
py: Fix emitnative's creation of small ints so it uses the macro.
Diffstat (limited to 'py/emitnative.c')
-rw-r--r-- | py/emitnative.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/emitnative.c b/py/emitnative.c index 423b1684b6..85eb891d4a 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -1125,7 +1125,7 @@ STATIC void emit_native_load_const_small_int(emit_t *emit, mp_int_t arg) { if (emit->do_viper_types) { emit_post_push_imm(emit, VTYPE_INT, arg); } else { - emit_post_push_imm(emit, VTYPE_PYOBJ, (arg << 1) | 1); + emit_post_push_imm(emit, VTYPE_PYOBJ, (mp_uint_t)MP_OBJ_NEW_SMALL_INT(arg)); } } |