Skip to content

Commit

Permalink
add rb_undef_alloc_func for Parser and Encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
dorkrawk authored May 17, 2022
1 parent 100bf70 commit d5771ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/yajl/yajl_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,7 @@ void Init_yajl() {
cStandardError = rb_const_get(rb_cObject, rb_intern("StandardError"));

cParser = rb_define_class_under(mYajl, "Parser", rb_cObject);
rb_undef_alloc_func(cParser);
rb_define_singleton_method(cParser, "new", rb_yajl_parser_new, -1);
rb_define_method(cParser, "initialize", rb_yajl_parser_init, -1);
rb_define_method(cParser, "parse", rb_yajl_parser_parse, -1);
Expand All @@ -1390,6 +1391,7 @@ void Init_yajl() {
rb_define_method(cProjector, "project", rb_yajl_projector_project, 1);

cEncoder = rb_define_class_under(mYajl, "Encoder", rb_cObject);
rb_undef_alloc_func(cEncoder);
rb_define_singleton_method(cEncoder, "new", rb_yajl_encoder_new, -1);
rb_define_method(cEncoder, "initialize", rb_yajl_encoder_init, -1);
rb_define_method(cEncoder, "encode", rb_yajl_encoder_encode, -1);
Expand Down

0 comments on commit d5771ab

Please sign in to comment.