From cf5b6f6974a1ca7d835803a744d1daae12876dac Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 25 Apr 2015 01:43:45 +0300 Subject: [PATCH] objfun: Fix to stackless mode after recent refactor. --- py/objfun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/objfun.c b/py/objfun.c index 77db2df501..ced8cebb0e 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -179,7 +179,7 @@ mp_code_state *mp_obj_fun_bc_prepare_codestate(mp_obj_t self_in, mp_uint_t n_arg code_state->n_state = n_state; code_state->code_info = 0; // offset to code-info - code_state->ip = ip - self->bytecode; // offset to prelude + code_state->ip = (byte*)(ip - self->bytecode); // offset to prelude mp_setup_code_state(code_state, self_in, n_args, n_kw, args); // execute the byte code with the correct globals context