diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-29 18:58:52 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-29 18:58:52 +0000 |
commit | 08d075592f3fa958ac3f24e176bee5ab56e78f49 (patch) | |
tree | 6b09520f0cabc7330dda34bd2da8c17bff3d8b79 /py/emitcpy.c | |
parent | 1ba1facaaa112c02fd3dcc1bfcb8e228787629ed (diff) | |
download | micropython-08d075592f3fa958ac3f24e176bee5ab56e78f49.tar.gz micropython-08d075592f3fa958ac3f24e176bee5ab56e78f49.zip |
py: Fix bug with LOAD_METHOD; fix int->machine_int_t for small int.
LOAD_METHOD bug was: emitbc did not correctly calculate the amount of
stack usage for a LOAD_METHOD operation.
small int bug was: int was being used to pass small ints, when it should
have been machine_int_t.
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r-- | py/emitcpy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index 71861c918d..2e5c34cb2b 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -149,10 +149,10 @@ static void emit_cpy_load_const_tok(emit_t *emit, mp_token_kind_t tok) { } } -static void emit_cpy_load_const_small_int(emit_t *emit, int arg) { +static void emit_cpy_load_const_small_int(emit_t *emit, machine_int_t arg) { emit_pre(emit, 1, 3); if (emit->pass == PASS_3) { - printf("LOAD_CONST %d\n", arg); + printf("LOAD_CONST " INT_FMT "\n", arg); } } |