(Luau) Set thread globals to main thread globals when resetting the thread

This commit is contained in:
Alex Orlenko
2023-06-02 21:13:23 +01:00
parent a1089dbf95
commit c905a34b1d
2 changed files with 9 additions and 6 deletions
+6
View File
@@ -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 }