diff --git a/mlua-sys/Cargo.toml b/mlua-sys/Cargo.toml index 44f64df..4c6b78a 100644 --- a/mlua-sys/Cargo.toml +++ b/mlua-sys/Cargo.toml @@ -37,4 +37,4 @@ cfg-if = "1.0" pkg-config = "0.3.17" lua-src = { version = ">= 544.0.0, < 550.0.0", optional = true } luajit-src = { version = ">= 210.4.0, < 220.0.0", optional = true } -luau0-src = { version = "0.5.0", optional = true } +luau0-src = { version = "0.5.6", optional = true } diff --git a/mlua-sys/src/luau/lua.rs b/mlua-sys/src/luau/lua.rs index 22391ef..9556a4f 100644 --- a/mlua-sys/src/luau/lua.rs +++ b/mlua-sys/src/luau/lua.rs @@ -74,6 +74,7 @@ pub type lua_Continuation = unsafe extern "C" fn(L: *mut lua_State, status: c_in /// Type for userdata destructor functions. pub type lua_Udestructor = unsafe extern "C" fn(*mut c_void); +pub type lua_Destructor = unsafe extern "C" fn(L: *mut lua_State, *mut c_void); /// Type for memory-allocation functions. pub type lua_Alloc = unsafe extern "C" fn( @@ -265,11 +266,8 @@ extern "C" { // TODO: lua_encodepointer pub fn lua_clock() -> c_double; pub fn lua_setuserdatatag(L: *mut lua_State, idx: c_int, tag: c_int); - pub fn lua_setuserdatadtor( - L: *mut lua_State, - tag: c_int, - dtor: Option, - ); + pub fn lua_setuserdatadtor(L: *mut lua_State, tag: c_int, dtor: Option); + pub fn lua_getuserdatadtor(L: *mut lua_State, tag: c_int) -> Option; pub fn lua_clonefunction(L: *mut lua_State, idx: c_int); pub fn lua_cleartable(L: *mut lua_State, idx: c_int); }