Skip to main content

luaur_vm/functions/
lua_getallocf.rs

1use crate::records::lua_state::lua_State;
2use crate::type_aliases::lua_alloc::lua_Alloc;
3
4pub fn lua_getallocf(L: *mut lua_State, ud: *mut *mut core::ffi::c_void) -> lua_Alloc {
5    let f = unsafe { (*(*L).global).frealloc };
6    if !ud.is_null() {
7        unsafe { *ud = (*(*L).global).ud };
8    }
9    f
10}