ext/pf2/src/ruby_init.rs in pf2-0.2.0 vs ext/pf2/src/ruby_init.rs in pf2-0.3.0
- old
+ new
@@ -26,18 +26,24 @@
let rb_mPf2_SignalScheduler =
rb_define_class_under(rb_mPf2, cstr!("SignalScheduler"), rb_cObject);
rb_define_alloc_func(rb_mPf2_SignalScheduler, Some(SignalScheduler::rb_alloc));
rb_define_method(
rb_mPf2_SignalScheduler,
+ cstr!("initialize"),
+ Some(to_ruby_cfunc_with_args(SignalScheduler::rb_initialize)),
+ -1,
+ );
+ rb_define_method(
+ rb_mPf2_SignalScheduler,
cstr!("start"),
- Some(to_ruby_cfunc3(SignalScheduler::rb_start)),
- 2,
+ Some(to_ruby_cfunc_with_no_args(SignalScheduler::rb_start)),
+ 0,
);
rb_define_method(
rb_mPf2_SignalScheduler,
cstr!("stop"),
- Some(to_ruby_cfunc1(SignalScheduler::rb_stop)),
+ Some(to_ruby_cfunc_with_no_args(SignalScheduler::rb_stop)),
0,
);
}
let rb_mPf2_TimerThreadScheduler =
@@ -46,17 +52,23 @@
rb_mPf2_TimerThreadScheduler,
Some(TimerThreadScheduler::rb_alloc),
);
rb_define_method(
rb_mPf2_TimerThreadScheduler,
+ cstr!("initialize"),
+ Some(to_ruby_cfunc_with_args(TimerThreadScheduler::rb_initialize)),
+ -1,
+ );
+ rb_define_method(
+ rb_mPf2_TimerThreadScheduler,
cstr!("start"),
- Some(to_ruby_cfunc3(TimerThreadScheduler::rb_start)),
- 2,
+ Some(to_ruby_cfunc_with_no_args(TimerThreadScheduler::rb_start)),
+ 0,
);
rb_define_method(
rb_mPf2_TimerThreadScheduler,
cstr!("stop"),
- Some(to_ruby_cfunc1(TimerThreadScheduler::rb_stop)),
+ Some(to_ruby_cfunc_with_no_args(TimerThreadScheduler::rb_stop)),
0,
);
}
}