Skip to main content

luaur_vm/records/
lua_execution_callbacks.rs

1use crate::records::closure::Closure;
2use crate::records::lua_state::lua_State;
3use crate::records::proto::Proto;
4
5#[allow(non_camel_case_types)]
6#[repr(C)]
7#[derive(Debug)]
8pub struct lua_ExecutionCallbacks {
9    pub context: *mut core::ffi::c_void,
10    pub close: Option<unsafe extern "C" fn(L: *mut lua_State)>,
11    pub destroy: Option<unsafe extern "C" fn(L: *mut lua_State, proto: *mut Proto)>,
12    pub enter:
13        Option<unsafe extern "C" fn(L: *mut lua_State, proto: *mut Proto) -> core::ffi::c_int>,
14    pub disable: Option<unsafe extern "C" fn(L: *mut lua_State, proto: *mut Proto)>,
15    pub getmemorysize: Option<unsafe extern "C" fn(L: *mut lua_State, proto: *mut Proto) -> usize>,
16    pub gettypemapping: Option<
17        unsafe extern "C" fn(L: *mut lua_State, str: *const core::ffi::c_char, len: usize) -> u8,
18    >,
19    pub getcounterdata: Option<
20        unsafe extern "C" fn(
21            L: *mut lua_State,
22            proto: *mut Proto,
23            count: *mut usize,
24        ) -> *mut core::ffi::c_char,
25    >,
26    pub inlinefunction: Option<
27        unsafe extern "C" fn(
28            L: *mut lua_State,
29            caller: *mut Closure,
30            target: *mut Closure,
31            pc: u32,
32        ) -> *mut Proto,
33    >,
34}
35
36#[allow(non_camel_case_types)]
37pub type LuaExecutionCallbacks = lua_ExecutionCallbacks;