mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
(Luau) Set thread globals to main thread globals when resetting the thread
This commit is contained in:
@@ -3006,6 +3006,12 @@ impl LuaInner {
|
||||
self.state.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
#[cfg(feature = "luau")]
|
||||
#[inline(always)]
|
||||
pub(crate) fn main_state(&self) -> *mut ffi::lua_State {
|
||||
self.main_state
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub(crate) fn ref_thread(&self) -> *mut ffi::lua_State {
|
||||
unsafe { (*self.extra.get()).ref_thread }
|
||||
|
||||
Reference in New Issue
Block a user