ruby_sys/
vm.rs

1use types::{CallbackPtr, c_char, c_int, c_void, Value};
2
3extern "C" {
4    pub fn ruby_init();
5    pub fn rb_block_proc() -> Value;
6    pub fn rb_block_given_p() -> c_int;
7    pub fn rb_raise(exception: Value, message: *const c_char);
8    pub fn rb_require(name: *const c_char) -> Value;
9    pub fn rb_protect(func: CallbackPtr, args: *const c_void, state: *mut c_int) -> Value;
10
11    #[deprecated(since="0.2.18",
12        note="Use `thread::rb_thread_call_without_gvl()` instead")]
13    pub fn rb_thread_call_without_gvl(func: CallbackPtr,
14                                      args: *const c_void,
15                                      unblock_func: CallbackPtr,
16                                      unblock_args: *const c_void)
17                                      -> *mut c_void;
18
19    #[deprecated(since="0.2.18",
20        note="Use `thread::rb_thread_call_without_gvl2()` instead")]
21    pub fn rb_thread_call_without_gvl2(func: CallbackPtr,
22                                       args: *const c_void,
23                                       unblock_func: CallbackPtr,
24                                       unblock_args: *const c_void)
25                                       -> *mut c_void;
26
27    #[deprecated(since="0.2.18",
28        note="Use `thread::rb_thread_call_with_gvl()` instead")]
29    pub fn rb_thread_call_with_gvl(func: CallbackPtr, args: *const c_void) -> *mut c_void;
30}