@@ -143,7 +143,7 @@ static inline bool mp_obj_is_integer(mp_const_obj_t o) { return MP_OBJ_IS_INT(o)
143143
144144#define MP_DECLARE_CONST_FUN_OBJ (obj_name ) extern const mp_obj_fun_builtin_t obj_name
145145
146- #define MP_DEFINE_CONST_FUN_OBJ_VOID_PTR (obj_name , is_kw , n_args_min , n_args_max , fun_name ) const mp_obj_fun_builtin_t obj_name = {{&mp_type_fun_builtin}, is_kw, n_args_min, n_args_max, (void * )fun_name}
146+ #define MP_DEFINE_CONST_FUN_OBJ_VOID_PTR (obj_name , is_kw , n_args_min , n_args_max , fun_name ) const mp_obj_fun_builtin_t obj_name = {{&mp_type_fun_builtin}, is_kw, n_args_min, n_args_max, (void(*)(void) )fun_name}
147147#define MP_DEFINE_CONST_FUN_OBJ_0 (obj_name , fun_name ) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 0, 0, (mp_fun_0_t)fun_name)
148148#define MP_DEFINE_CONST_FUN_OBJ_1 (obj_name , fun_name ) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 1, 1, (mp_fun_1_t)fun_name)
149149#define MP_DEFINE_CONST_FUN_OBJ_2 (obj_name , fun_name ) MP_DEFINE_CONST_FUN_OBJ_VOID_PTR(obj_name, false, 2, 2, (mp_fun_2_t)fun_name)
@@ -622,7 +622,7 @@ typedef struct _mp_obj_fun_builtin_t { // use this to make const objects that go
622622 bool is_kw : 1 ;
623623 mp_uint_t n_args_min : 15 ; // inclusive
624624 mp_uint_t n_args_max : 16 ; // inclusive
625- void * fun ; // must be a pointer to a callable function in ROM
625+ void ( * fun )( void ) ; // must be a pointer to a callable function in ROM
626626} mp_obj_fun_builtin_t ;
627627
628628qstr mp_obj_fun_get_name (mp_const_obj_t fun );
0 commit comments