Skip to content

Commit

Permalink
Merge pull request #50 from XrXr/fix-c23
Browse files Browse the repository at this point in the history
Remove unnecessary use of RUBY_METHOD_FUNC
  • Loading branch information
miyucy authored Dec 2, 2024
2 parents 02fe445 + 59e8ac3 commit 062a9d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ext/brotli/brotli.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,19 +475,19 @@ Init_brotli(void)
rb_mBrotli = rb_define_module("Brotli");
rb_eBrotli = rb_define_class_under(rb_mBrotli, "Error", rb_eStandardError);
rb_global_variable(&rb_eBrotli);
rb_define_singleton_method(rb_mBrotli, "deflate", RUBY_METHOD_FUNC(brotli_deflate), -1);
rb_define_singleton_method(rb_mBrotli, "inflate", RUBY_METHOD_FUNC(brotli_inflate), 1);
rb_define_singleton_method(rb_mBrotli, "version", RUBY_METHOD_FUNC(brotli_version), 0);
rb_define_singleton_method(rb_mBrotli, "deflate", brotli_deflate, -1);
rb_define_singleton_method(rb_mBrotli, "inflate", brotli_inflate, 1);
rb_define_singleton_method(rb_mBrotli, "version", brotli_version, 0);
id_read = rb_intern("read");
// Brotli::Writer
id_write = rb_intern("write");
id_flush = rb_intern("flush");
id_close = rb_intern("close");
rb_Writer = rb_define_class_under(rb_mBrotli, "Writer", rb_cObject);
rb_define_alloc_func(rb_Writer, rb_writer_alloc);
rb_define_method(rb_Writer, "initialize", RUBY_METHOD_FUNC(rb_writer_initialize), -1);
rb_define_method(rb_Writer, "write", RUBY_METHOD_FUNC(rb_writer_write), 1);
rb_define_method(rb_Writer, "finish", RUBY_METHOD_FUNC(rb_writer_finish), 0);
rb_define_method(rb_Writer, "flush", RUBY_METHOD_FUNC(rb_writer_flush), 0);
rb_define_method(rb_Writer, "close", RUBY_METHOD_FUNC(rb_writer_close), 0);
rb_define_method(rb_Writer, "initialize", rb_writer_initialize, -1);
rb_define_method(rb_Writer, "write", rb_writer_write, 1);
rb_define_method(rb_Writer, "finish", rb_writer_finish, 0);
rb_define_method(rb_Writer, "flush", rb_writer_flush, 0);
rb_define_method(rb_Writer, "close", rb_writer_close, 0);
}

0 comments on commit 062a9d3

Please sign in to comment.