@@ -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
410410
411411STATIC mp_obj_t fun_native_call (mp_obj_t self_in , size_t n_args , size_t n_kw , const mp_obj_t * args ) {
412412 MP_STACK_CHECK ();
413- mp_obj_fun_bc_t * self = self_in ;
413+ mp_obj_fun_bc_t * self = MP_OBJ_TO_PTR ( self_in ) ;
414414 mp_call_fun_t fun = MICROPY_MAKE_POINTER_CALLABLE ((void * )self -> bytecode );
415415 return fun (self_in , n_args , n_kw , args );
416416}
@@ -424,9 +424,9 @@ STATIC const mp_obj_type_t mp_type_fun_native = {
424424};
425425
426426mp_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 ) {
427- mp_obj_fun_bc_t * o = mp_obj_new_fun_bc (def_args_in , def_kw_args , (const byte * )fun_data , const_table );
427+ 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 ) );
428428 o -> base .type = & mp_type_fun_native ;
429- return o ;
429+ return MP_OBJ_FROM_PTR ( o ) ;
430430}
431431
432432#endif // MICROPY_EMIT_NATIVE
@@ -494,7 +494,7 @@ STATIC mp_uint_t convert_obj_for_inline_asm(mp_obj_t obj) {
494494}
495495
496496STATIC mp_obj_t fun_asm_call (mp_obj_t self_in , size_t n_args , size_t n_kw , const mp_obj_t * args ) {
497- mp_obj_fun_asm_t * self = self_in ;
497+ mp_obj_fun_asm_t * self = MP_OBJ_TO_PTR ( self_in ) ;
498498
499499 mp_arg_check_num (n_args , n_kw , self -> n_args , self -> n_args , false);
500500
@@ -537,7 +537,7 @@ mp_obj_t mp_obj_new_fun_asm(size_t n_args, const void *fun_data, mp_uint_t type_
537537 o -> n_args = n_args ;
538538 o -> fun_data = fun_data ;
539539 o -> type_sig = type_sig ;
540- return o ;
540+ return MP_OBJ_FROM_PTR ( o ) ;
541541}
542542
543543#endif // MICROPY_EMIT_INLINE_ASM
0 commit comments