Skip to content

Commit

Permalink
Avoid warning on Ruby 3.2
Browse files Browse the repository at this point in the history
Without this, running on Ruby 3.2 gives the following warning:

tkutil.so: warning: undefining the allocator of T_DATA class TkUtil::CallbackSubst::Info
  • Loading branch information
jeremyevans committed Jan 2, 2023
1 parent 1972600 commit bf02b2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/tk/tkutil/tkutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,6 +1797,7 @@ Init_tkutil(void)
rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0);

cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject);
rb_undef_alloc_func(cSUBST_INFO);
rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0);

ID_SUBST_INFO = rb_intern("SUBST_INFO");
Expand Down

0 comments on commit bf02b2a

Please sign in to comment.