Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mri/ext/llhttp/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
require "mkmf"

dir_config("llhttp_ext")

# Check for Ractor support
have_func("rb_ext_ractor_safe", "ruby.h")

create_makefile("llhttp_ext")
4 changes: 4 additions & 0 deletions mri/ext/llhttp/llhttp_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ static VALUE rb_llhttp_init(VALUE self, VALUE type) {
}

void Init_llhttp_ext(void) {
#ifdef HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif

mLLHttp = rb_const_get(rb_cObject, rb_intern("LLHttp"));
cParser = rb_const_get(mLLHttp, rb_intern("Parser"));
eError = rb_const_get(mLLHttp, rb_intern("Error"));
Expand Down