@@ -397,6 +397,7 @@ typedef mp_uint_t (*viper_fun_0_t)(void);
397397typedef mp_uint_t (* viper_fun_1_t )(mp_uint_t );
398398typedef mp_uint_t (* viper_fun_2_t )(mp_uint_t , mp_uint_t );
399399typedef mp_uint_t (* viper_fun_3_t )(mp_uint_t , mp_uint_t , mp_uint_t );
400+ typedef mp_uint_t (* viper_fun_4_t )(mp_uint_t , mp_uint_t , mp_uint_t , mp_uint_t );
400401
401402STATIC mp_obj_t fun_viper_call (mp_obj_t self_in , mp_uint_t n_args , mp_uint_t n_kw , const mp_obj_t * args ) {
402403 mp_obj_fun_viper_t * self = self_in ;
@@ -414,7 +415,15 @@ STATIC mp_obj_t fun_viper_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_k
414415 ret = ((viper_fun_2_t )fun )(mp_convert_obj_to_native (args [0 ], self -> type_sig >> 2 ), mp_convert_obj_to_native (args [1 ], self -> type_sig >> 4 ));
415416 } else if (n_args == 3 ) {
416417 ret = ((viper_fun_3_t )fun )(mp_convert_obj_to_native (args [0 ], self -> type_sig >> 2 ), mp_convert_obj_to_native (args [1 ], self -> type_sig >> 4 ), mp_convert_obj_to_native (args [2 ], self -> type_sig >> 6 ));
418+ } else if (n_args == 4 ) {
419+ ret = ((viper_fun_4_t )fun )(
420+ mp_convert_obj_to_native (args [0 ], self -> type_sig >> 2 ),
421+ mp_convert_obj_to_native (args [1 ], self -> type_sig >> 4 ),
422+ mp_convert_obj_to_native (args [2 ], self -> type_sig >> 6 ),
423+ mp_convert_obj_to_native (args [3 ], self -> type_sig >> 8 )
424+ );
417425 } else {
426+ // TODO 5 or more arguments not supported for viper call
418427 assert (0 );
419428 ret = 0 ;
420429 }
0 commit comments