summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-12-17 12:32:41 +0000
committerDamien George <damien.p.george@gmail.com>2015-12-17 12:32:41 +0000
commit7a30e87d2b8c14dadf5021a03740c4ca48178f53 (patch)
tree429a0eefd61c387b08d328eee6f1cb7fb3424655
parentab1e36dcf9b7182d18704f627aff461ce87d7d09 (diff)
downloadmicropython-7a30e87d2b8c14dadf5021a03740c4ca48178f53.tar.gz
micropython-7a30e87d2b8c14dadf5021a03740c4ca48178f53.zip
py: Fix MICROPY_STACKLESS mode to compile with MICROPY_OBJ_REPR_D.
-rw-r--r--py/objfun.c2
-rw-r--r--py/vm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 88e84ce9fc..4c1b7211d1 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -167,7 +167,7 @@ STATIC void dump_args(const mp_obj_t *a, mp_uint_t sz) {
#if MICROPY_STACKLESS
mp_code_state *mp_obj_fun_bc_prepare_codestate(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
MP_STACK_CHECK();
- mp_obj_fun_bc_t *self = self_in;
+ mp_obj_fun_bc_t *self = MP_OBJ_TO_PTR(self_in);
// get start of bytecode
const byte *ip = self->bytecode;
diff --git a/py/vm.c b/py/vm.c
index 5bf14eb75b..8bf59f1e05 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -973,7 +973,7 @@ unwind_jump:;
mp_uint_t n_args = unum & 0xff;
mp_uint_t n_kw = (unum >> 8) & 0xff;
- int adjust = (sp[1] == NULL) ? 0 : 1;
+ int adjust = (sp[1] == MP_OBJ_NULL) ? 0 : 1;
mp_code_state *new_state = mp_obj_fun_bc_prepare_codestate(*sp, n_args + adjust, n_kw, sp + 2 - adjust);
if (new_state) {