@@ -21,7 +21,7 @@ static void rb_mysql_stmt_mark(void * ptr) {
21
21
rb_gc_mark (stmt_wrapper -> client );
22
22
}
23
23
24
- static void * nogvl_stmt_close (void * ptr ) {
24
+ static void * nogvl_stmt_close (void * ptr ) {
25
25
mysql_stmt_wrapper * stmt_wrapper = ptr ;
26
26
if (stmt_wrapper -> stmt ) {
27
27
mysql_stmt_close (stmt_wrapper -> stmt );
@@ -30,7 +30,7 @@ static void *nogvl_stmt_close(void * ptr) {
30
30
return NULL ;
31
31
}
32
32
33
- static void rb_mysql_stmt_free (void * ptr ) {
33
+ static void rb_mysql_stmt_free (void * ptr ) {
34
34
mysql_stmt_wrapper * stmt_wrapper = ptr ;
35
35
decr_mysql2_stmt (stmt_wrapper );
36
36
}
@@ -145,7 +145,7 @@ VALUE rb_mysql_stmt_new(VALUE rb_client, VALUE sql) {
145
145
*
146
146
* Returns the number of parameters the prepared statement expects.
147
147
*/
148
- static VALUE param_count (VALUE self ) {
148
+ static VALUE rb_mysql_stmt_param_count (VALUE self ) {
149
149
GET_STATEMENT (self );
150
150
151
151
return ULL2NUM (mysql_stmt_param_count (stmt_wrapper -> stmt ));
@@ -155,13 +155,13 @@ static VALUE param_count(VALUE self) {
155
155
*
156
156
* Returns the number of fields the prepared statement returns.
157
157
*/
158
- static VALUE field_count (VALUE self ) {
158
+ static VALUE rb_mysql_stmt_field_count (VALUE self ) {
159
159
GET_STATEMENT (self );
160
160
161
161
return UINT2NUM (mysql_stmt_field_count (stmt_wrapper -> stmt ));
162
162
}
163
163
164
- static void * nogvl_execute (void * ptr ) {
164
+ static void * nogvl_stmt_execute (void * ptr ) {
165
165
MYSQL_STMT * stmt = ptr ;
166
166
167
167
if (mysql_stmt_execute (stmt )) {
@@ -246,7 +246,7 @@ static int my_big2ll(VALUE bignum, LONG_LONG *ptr)
246
246
*
247
247
* Executes the current prepared statement, returns +result+.
248
248
*/
249
- static VALUE execute (int argc , VALUE * argv , VALUE self ) {
249
+ static VALUE rb_mysql_stmt_execute (int argc , VALUE * argv , VALUE self ) {
250
250
MYSQL_BIND * bind_buffers = NULL ;
251
251
unsigned long * length_buffers = NULL ;
252
252
unsigned long bind_count ;
@@ -401,7 +401,7 @@ static VALUE execute(int argc, VALUE *argv, VALUE self) {
401
401
}
402
402
}
403
403
404
- if ((VALUE )rb_thread_call_without_gvl (nogvl_execute , stmt , RUBY_UBF_IO , 0 ) == Qfalse ) {
404
+ if ((VALUE )rb_thread_call_without_gvl (nogvl_stmt_execute , stmt , RUBY_UBF_IO , 0 ) == Qfalse ) {
405
405
FREE_BINDS ;
406
406
rb_raise_mysql2_stmt_error (stmt_wrapper );
407
407
}
@@ -449,7 +449,7 @@ static VALUE execute(int argc, VALUE *argv, VALUE self) {
449
449
*
450
450
* Returns a list of fields that will be returned by this statement.
451
451
*/
452
- static VALUE fields (VALUE self ) {
452
+ static VALUE rb_mysql_stmt_fields (VALUE self ) {
453
453
MYSQL_FIELD * fields ;
454
454
MYSQL_RES * metadata ;
455
455
unsigned int field_count ;
@@ -542,10 +542,10 @@ static VALUE rb_mysql_stmt_close(VALUE self) {
542
542
void init_mysql2_statement () {
543
543
cMysql2Statement = rb_define_class_under (mMysql2 , "Statement" , rb_cObject );
544
544
545
- rb_define_method (cMysql2Statement , "param_count" , param_count , 0 );
546
- rb_define_method (cMysql2Statement , "field_count" , field_count , 0 );
547
- rb_define_method (cMysql2Statement , "_execute" , execute , -1 );
548
- rb_define_method (cMysql2Statement , "fields" , fields , 0 );
545
+ rb_define_method (cMysql2Statement , "param_count" , rb_mysql_stmt_param_count , 0 );
546
+ rb_define_method (cMysql2Statement , "field_count" , rb_mysql_stmt_field_count , 0 );
547
+ rb_define_method (cMysql2Statement , "_execute" , rb_mysql_stmt_execute , -1 );
548
+ rb_define_method (cMysql2Statement , "fields" , rb_mysql_stmt_fields , 0 );
549
549
rb_define_method (cMysql2Statement , "last_id" , rb_mysql_stmt_last_id , 0 );
550
550
rb_define_method (cMysql2Statement , "affected_rows" , rb_mysql_stmt_affected_rows , 0 );
551
551
rb_define_method (cMysql2Statement , "close" , rb_mysql_stmt_close , 0 );
0 commit comments