Skip to content

Commit 2d26e0a

Browse files
committed
protect around rb_intern3
1 parent a2fc987 commit 2d26e0a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ext/mysql2/extconf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def asplode lib
99
have_func('rb_thread_blocking_region')
1010
have_func('rb_wait_for_single_fd')
1111
have_func('rb_hash_dup')
12+
have_func('rb_intern3')
1213

1314
# borrowed from mysqlplus
1415
# http://github.com/oldmoe/mysqlplus/blob/master/ext/extconf.rb

ext/mysql2/result.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static VALUE rb_mysql_result_fetch_field(VALUE self, unsigned int idx, short int
129129
memcpy(buf, field->name, field->name_length);
130130
buf[field->name_length] = 0;
131131

132-
#ifdef HAVE_RUBY_ENCODING_H
132+
#ifdef HAVE_RB_INTERN3
133133
rb_field = rb_intern3(buf, field->name_length, rb_utf8_encoding());
134134
rb_field = ID2SYM(rb_field);
135135
#else

0 commit comments

Comments
 (0)