mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Add Lua 5.4 (rc2) support
This commit is contained in:
+3
-2
@@ -129,7 +129,9 @@ impl<'lua> Thread<'lua> {
|
||||
}
|
||||
ffi::lua_xmove(lua.state, thread_state, nargs);
|
||||
|
||||
let ret = ffi::lua_resume(thread_state, lua.state, nargs);
|
||||
let mut nresults = 0;
|
||||
|
||||
let ret = ffi::lua_resume(thread_state, lua.state, nargs, &mut nresults as *mut c_int);
|
||||
if ret != ffi::LUA_OK && ret != ffi::LUA_YIELD {
|
||||
protect_lua_closure(lua.state, 0, 0, |_| {
|
||||
error_traceback(thread_state);
|
||||
@@ -138,7 +140,6 @@ impl<'lua> Thread<'lua> {
|
||||
return Err(pop_error(thread_state, ret));
|
||||
}
|
||||
|
||||
let nresults = ffi::lua_gettop(thread_state);
|
||||
let mut results = MultiValue::new();
|
||||
ffi::lua_xmove(thread_state, lua.state, nresults);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user