Add lua_xpush to 5.1-5.4

This commit is contained in:
Alex Orlenko
2022-07-17 00:03:40 +01:00
parent 0919ff21c9
commit f7ee6dc635
5 changed files with 24 additions and 6 deletions
-6
View File
@@ -2394,12 +2394,6 @@ impl Lua {
"Lua instance passed Value created from a different main Lua state"
);
let extra = &*self.extra.get();
#[cfg(not(feature = "luau"))]
{
ffi::lua_pushvalue(extra.ref_thread, lref.index);
ffi::lua_xmove(extra.ref_thread, self.state, 1);
}
#[cfg(feature = "luau")]
ffi::lua_xpush(extra.ref_thread, self.state, lref.index);
}