Skip to content

Commit

Permalink
Undefine T_DATA allocators for Ruby 3.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Jan 17, 2022
1 parent 25c42c7 commit 87b3caf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/mysql2/result.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ void init_mysql2_result() {
rb_global_variable(&cDateTime);

cMysql2Result = rb_define_class_under(mMysql2, "Result", rb_cObject);
rb_undef_alloc_func(cMysql2Result);
rb_global_variable(&cMysql2Result);

rb_define_method(cMysql2Result, "each", rb_mysql_result_each, -1);
Expand Down
1 change: 1 addition & 0 deletions ext/mysql2/statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ void init_mysql2_statement() {
rb_global_variable(&cBigDecimal);

cMysql2Statement = rb_define_class_under(mMysql2, "Statement", rb_cObject);
rb_undef_alloc_func(cMysql2Statement);
rb_global_variable(&cMysql2Statement);

rb_define_method(cMysql2Statement, "param_count", rb_mysql_stmt_param_count, 0);
Expand Down

0 comments on commit 87b3caf

Please sign in to comment.