From 09dfc9b88445846825338f5b39293e06bc0f0905 Mon Sep 17 00:00:00 2001 From: rise0chen Date: Wed, 27 Nov 2024 16:21:56 +0800 Subject: [PATCH] global hook --- src/state/raw.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/state/raw.rs b/src/state/raw.rs index 0af877f5..7b2e7b23 100644 --- a/src/state/raw.rs +++ b/src/state/raw.rs @@ -388,11 +388,6 @@ impl RawLua { unsafe extern "C-unwind" fn hook_proc(state: *mut ffi::lua_State, ar: *mut ffi::lua_Debug) { let extra = ExtraData::get(state); - if (*extra).hook_thread != state { - // Hook was destined for a different thread, ignore - ffi::lua_sethook(state, None, 0, 0); - return; - } let result = callback_error_ext(state, extra, move |extra, _| { let hook_cb = (*extra).hook_callback.clone(); let hook_cb = mlua_expect!(hook_cb, "no hook callback set in hook_proc");