Skip to content

Commit 66db2dd

Browse files
committed
Prefix the methods in statement.c with rb_mysql_
1 parent 105c9f0 commit 66db2dd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ext/mysql2/statement.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ VALUE rb_mysql_stmt_new(VALUE rb_client, VALUE sql) {
145145
*
146146
* Returns the number of parameters the prepared statement expects.
147147
*/
148-
static VALUE param_count(VALUE self) {
148+
static VALUE rb_mysql_stmt_param_count(VALUE self) {
149149
GET_STATEMENT(self);
150150

151151
return ULL2NUM(mysql_stmt_param_count(stmt_wrapper->stmt));
@@ -155,13 +155,13 @@ static VALUE param_count(VALUE self) {
155155
*
156156
* Returns the number of fields the prepared statement returns.
157157
*/
158-
static VALUE field_count(VALUE self) {
158+
static VALUE rb_mysql_stmt_field_count(VALUE self) {
159159
GET_STATEMENT(self);
160160

161161
return UINT2NUM(mysql_stmt_field_count(stmt_wrapper->stmt));
162162
}
163163

164-
static void *nogvl_execute(void *ptr) {
164+
static void *nogvl_stmt_execute(void *ptr) {
165165
MYSQL_STMT *stmt = ptr;
166166

167167
if (mysql_stmt_execute(stmt)) {
@@ -246,7 +246,7 @@ static int my_big2ll(VALUE bignum, LONG_LONG *ptr)
246246
*
247247
* Executes the current prepared statement, returns +result+.
248248
*/
249-
static VALUE execute(int argc, VALUE *argv, VALUE self) {
249+
static VALUE rb_mysql_stmt_execute(int argc, VALUE *argv, VALUE self) {
250250
MYSQL_BIND *bind_buffers = NULL;
251251
unsigned long *length_buffers = NULL;
252252
unsigned long bind_count;
@@ -401,7 +401,7 @@ static VALUE execute(int argc, VALUE *argv, VALUE self) {
401401
}
402402
}
403403

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) {
405405
FREE_BINDS;
406406
rb_raise_mysql2_stmt_error(stmt_wrapper);
407407
}
@@ -449,7 +449,7 @@ static VALUE execute(int argc, VALUE *argv, VALUE self) {
449449
*
450450
* Returns a list of fields that will be returned by this statement.
451451
*/
452-
static VALUE fields(VALUE self) {
452+
static VALUE rb_mysql_stmt_fields(VALUE self) {
453453
MYSQL_FIELD *fields;
454454
MYSQL_RES *metadata;
455455
unsigned int field_count;
@@ -542,10 +542,10 @@ static VALUE rb_mysql_stmt_close(VALUE self) {
542542
void init_mysql2_statement() {
543543
cMysql2Statement = rb_define_class_under(mMysql2, "Statement", rb_cObject);
544544

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);
549549
rb_define_method(cMysql2Statement, "last_id", rb_mysql_stmt_last_id, 0);
550550
rb_define_method(cMysql2Statement, "affected_rows", rb_mysql_stmt_affected_rows, 0);
551551
rb_define_method(cMysql2Statement, "close", rb_mysql_stmt_close, 0);

0 commit comments

Comments
 (0)