pub unsafe extern "C" fn rb_protect(
    f: extern "C" fn(_: VALUE) -> VALUE,
    args: VALUE,
    state: *mut c_int
) -> VALUE
Expand description

Protects a function call from potential global escapes from the function. Such global escapes include exceptions, throw, break, for example.

Calls your C function with the value specified in args. If the C function does not escape, sets state to 0.