use crate::records::lua_debug::LuaDebug as lua_Debug;
use crate::type_aliases::lua_state::lua_State;
use core::ffi::{c_char, c_int, c_void};
#[repr(C)]
#[derive(Debug, Clone)]
pub struct LuaCallbacks {
pub userdata: *mut c_void,
pub interrupt: Option<unsafe extern "C-unwind" fn(l: *mut lua_State, gc: c_int)>,
pub panic: Option<unsafe extern "C" fn(l: *mut lua_State, errcode: c_int)>,
pub userthread: Option<unsafe extern "C" fn(lp: *mut lua_State, l: *mut lua_State)>,
pub useratom:
Option<unsafe extern "C" fn(l: *mut lua_State, s: *const c_char, len: usize) -> i16>,
pub debugbreak: Option<unsafe extern "C" fn(l: *mut lua_State, ar: *mut lua_Debug)>,
pub debugstep: Option<unsafe extern "C" fn(l: *mut lua_State, ar: *mut lua_Debug)>,
pub debuginterrupt: Option<unsafe extern "C" fn(l: *mut lua_State, ar: *mut lua_Debug)>,
pub debugprotectederror: Option<unsafe extern "C-unwind" fn(l: *mut lua_State)>,
pub onallocate: Option<unsafe extern "C" fn(l: *mut lua_State, osize: usize, nsize: usize)>,
}
#[allow(non_camel_case_types)]
pub type lua_Callbacks = LuaCallbacks;