@@ -66,6 +66,8 @@ typedef struct {
66
66
VALUE block_given ;
67
67
} result_each_args ;
68
68
69
+ typedef VALUE (* fetch_row_func_t )(VALUE , MYSQL_FIELD * fields , const result_each_args * args );
70
+
69
71
VALUE cBigDecimal , cDateTime , cDate ;
70
72
static VALUE cMysql2Result ;
71
73
static VALUE opt_decimal_zero , opt_float_zero , opt_time_year , opt_time_month , opt_utc_offset ;
@@ -804,8 +806,8 @@ static VALUE rb_mysql_result_element(int argc, VALUE * argv, VALUE self) {
804
806
MYSQL_FIELD * fields = NULL ;
805
807
VALUE seek , count , row , rows ;
806
808
long i , c_seek , c_count = 0 ;
807
- VALUE (* fetch_row_func )(VALUE , MYSQL_FIELD * fields , const result_each_args * args );
808
809
VALUE block , opts ;
810
+ fetch_row_func_t fetch_row_func ;
809
811
810
812
GET_RESULT (self );
811
813
@@ -880,7 +882,7 @@ static VALUE rb_mysql_result_element(int argc, VALUE * argv, VALUE self) {
880
882
}
881
883
882
884
static VALUE rb_mysql_result_each_ (VALUE self ,
883
- VALUE ( * fetch_row_func )( VALUE , MYSQL_FIELD * fields , const result_each_args * args ) ,
885
+ fetch_row_func_t fetch_row_func ,
884
886
const result_each_args * args )
885
887
{
886
888
unsigned long i ;
@@ -970,8 +972,8 @@ static VALUE rb_mysql_result_each_(VALUE self,
970
972
971
973
static VALUE rb_mysql_result_each (int argc , VALUE * argv , VALUE self ) {
972
974
result_each_args args ;
973
- VALUE (* fetch_row_func )(VALUE , MYSQL_FIELD * fields , const result_each_args * args );
974
975
VALUE opts , block ;
976
+ fetch_row_func_t fetch_row_func ;
975
977
976
978
GET_RESULT (self );
977
979
0 commit comments