Add Lua 5.4 (rc2) support

This commit is contained in:
Alex Orlenko
2020-05-08 12:42:40 +01:00
parent 5c226b4915
commit 539b569ff4
15 changed files with 181 additions and 58 deletions
+1 -1
View File
@@ -485,7 +485,7 @@ pub unsafe extern "C" fn error_traceback(state: *mut ffi::lua_State) -> c_int {
// Does not call lua_checkstack, uses 1 stack space.
pub unsafe fn get_main_state(state: *mut ffi::lua_State) -> *mut ffi::lua_State {
#[cfg(any(feature = "lua53", feature = "lua52"))]
#[cfg(any(feature = "lua54", feature = "lua53", feature = "lua52"))]
{
ffi::lua_rawgeti(state, ffi::LUA_REGISTRYINDEX, ffi::LUA_RIDX_MAINTHREAD);
let main_state = ffi::lua_tothread(state, -1);