pub unsafe extern "C" fn safe_pcall(state: *mut ffi::lua_State) -> c_int {
    ffi::luaL_checkstack(state, 2, ptr::null());

    let top = ffi::lua_gettop(state);
    if top == 0 {
        ffi::lua_pushstring(state, cstr!("not enough arguments to pcall"));
        ffi::lua_error(state);
    }

    if ffi::lua_pcall(state, top - 1, ffi::LUA_MULTRET, 0) == ffi::LUA_OK {
        ffi::lua_pushboolean(state, 1);
        ffi::lua_insert(state, 1);
        ffi::lua_gettop(state)
    } else {
        if !get_gc_userdata::<WrappedPanic>(state, -1).is_null() {
            ffi::lua_error(state);
        }
        ffi::lua_pushboolean(state, 0);
        ffi::lua_insert(state, -2);
        2
    }
}
// A variant of `pcall` that does not allow Lua to catch Rust panics from `callback_error`.
A variant of `pcall` that does not allow Lua to catch Rust panics from `callback_error`.
A variant of ` pcall ` that does not allow Lua to catch Rust panics from ` callback_error ` .
pub unsafe extern "C" fn safe_pcall(state: *mut ffi::lua_State) -> c_int {
    ffi::luaL_checkstack(state, 2, ptr::null());
    let top = ffi::lua_gettop(state);
    if top == 0 {
        ffi::lua_pushstring(state, cstr!("not enough arguments to pcall"));
        ffi::lua_error(state);
    }
    if ffi::lua_pcall(state, top - 1, ffi::LUA_MULTRET, 0) == ffi::LUA_OK {
        ffi::lua_pushboolean(state, 1);
        ffi::lua_insert(state, 1);
        ffi::lua_gettop(state)
    } else {
        if !get_gc_userdata::<WrappedPanic>(state, -1).is_null() {
            ffi::lua_error(state);
        }
        ffi::lua_pushboolean(state, 0);
        ffi::lua_insert(state, -2);
        2
    }
}
pub unsafe extern " " fn safe_pcall ( state : * mut ffi :: lua_State ) -> c_int { ffi :: luaL_checkstack ( state , 2 , ptr :: null ( ) ) ; let top = ffi :: lua_gettop ( state ) ; if top == 0 { ffi :: lua_pushstring ( state , cstr ! ( " " ) ) ; ffi :: lua_error ( state ) ; } if ffi :: lua_pcall ( state , top - 1 , ffi :: LUA_MULTRET , 0 ) == ffi :: LUA_OK { ffi :: lua_pushboolean ( state , 1 ) ; ffi :: lua_insert ( state , 1 ) ; ffi :: lua_gettop ( state ) } else { if ! get_gc_userdata :: < WrappedPanic > ( state , - 1 ) . is_null ( ) { ffi :: lua_error ( state ) ; } ffi :: lua_pushboolean ( state , 0 ) ; ffi :: lua_insert ( state , - 2 ) ; 2 } }
A variant of `pcall` that does not allow Lua to catch Rust panics from `callback_error`.
A variant of ` pcall ` that does not allow Lua to catch Rust panics from ` callback_error ` .
state
*mut ffi::lua_State
state
*mut ffi::lua_State