diff options
| author | stijn <stijn@ignitron.net> | 2022-01-11 17:25:06 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-01-23 09:25:01 +1100 |
| commit | a9448c0a86d6d1f04e190d5c093ca93d9470b99a (patch) | |
| tree | fbfaa0278442c5f3028c49f781c3cab318dbe326 /py/objfun.c | |
| parent | 5f8eef4521866a072e27914d597c48e44a2c16e4 (diff) | |
all: Fix MICROPY_OBJ_REPR_D compilation with msvc.
Diffstat (limited to 'py/objfun.c')
| -rw-r--r-- | py/objfun.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objfun.c b/py/objfun.c index d86a4d235..85f531c88 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -410,7 +410,7 @@ mp_obj_t mp_obj_new_fun_bc(mp_obj_t def_args_in, mp_obj_t def_kw_args, const byt STATIC mp_obj_t fun_native_call(mp_obj_t self_in, size_t n_args, size_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); mp_call_fun_t fun = MICROPY_MAKE_POINTER_CALLABLE((void *)self->bytecode); return fun(self_in, n_args, n_kw, args); } @@ -424,9 +424,9 @@ STATIC const mp_obj_type_t mp_type_fun_native = { }; mp_obj_t mp_obj_new_fun_native(mp_obj_t def_args_in, mp_obj_t def_kw_args, const void *fun_data, const mp_uint_t *const_table) { - mp_obj_fun_bc_t *o = mp_obj_new_fun_bc(def_args_in, def_kw_args, (const byte *)fun_data, const_table); + mp_obj_fun_bc_t *o = MP_OBJ_TO_PTR(mp_obj_new_fun_bc(def_args_in, def_kw_args, (const byte *)fun_data, const_table)); o->base.type = &mp_type_fun_native; - return o; + return MP_OBJ_FROM_PTR(o); } #endif // MICROPY_EMIT_NATIVE @@ -494,7 +494,7 @@ STATIC mp_uint_t convert_obj_for_inline_asm(mp_obj_t obj) { } STATIC mp_obj_t fun_asm_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_obj_fun_asm_t *self = self_in; + mp_obj_fun_asm_t *self = MP_OBJ_TO_PTR(self_in); mp_arg_check_num(n_args, n_kw, self->n_args, self->n_args, false); @@ -537,7 +537,7 @@ mp_obj_t mp_obj_new_fun_asm(size_t n_args, const void *fun_data, mp_uint_t type_ o->n_args = n_args; o->fun_data = fun_data; o->type_sig = type_sig; - return o; + return MP_OBJ_FROM_PTR(o); } #endif // MICROPY_EMIT_INLINE_ASM |
