1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Refactor rb_add_event_hook function

This commit is contained in:
S-H-GAMELINKS 2021-09-28 22:46:47 +09:00 committed by Samuel Williams
parent fd76117a5d
commit d3bd73823b
Notes: git 2021-09-29 05:17:15 +09:00

View file

@ -167,8 +167,7 @@ rb_thread_add_event_hook(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t
void
rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
{
rb_event_hook_t *hook = alloc_event_hook(func, events, data, RUBY_EVENT_HOOK_FLAG_SAFE);
connect_event_hook(GET_EC(), hook);
rb_add_event_hook2(func, events, data, RUBY_EVENT_HOOK_FLAG_SAFE);
}
void