summaryrefslogtreecommitdiff
path: root/src/types.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2022-04-08 10:45:28 +0100
committerAlex Orlenko <zxteam@protonmail.com>2022-04-08 10:45:28 +0100
commit70d287cf9f389f1a8f318ff201dd54b575a9f5b2 (patch)
tree3faecabccaa64ff7c2616d1522f81a4aa1553cfc /src/types.rs
parentd607039a313b77dd6db1e2e3cd0643a09c652f86 (diff)
downloadmlua-70d287cf9f389f1a8f318ff201dd54b575a9f5b2.zip
Don't pass Lua handler to interrupt callback (Luau) as it's not safe.
Optimize callback_error_ext to check stack only before allocating a new WrappedFailure.
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/types.rs b/src/types.rs
index 47d6de3..a14ff3f 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -65,10 +65,10 @@ pub(crate) type HookCallback = Arc<dyn Fn(&Lua, Debug) -> Result<()> + Send>;
pub(crate) type HookCallback = Arc<dyn Fn(&Lua, Debug) -> Result<()>>;
#[cfg(all(feature = "luau", feature = "send"))]
-pub(crate) type InterruptCallback = Arc<dyn Fn(&Lua) -> Result<VmState> + Send>;
+pub(crate) type InterruptCallback = Arc<dyn Fn() -> Result<VmState> + Send>;
#[cfg(all(feature = "luau", not(feature = "send")))]
-pub(crate) type InterruptCallback = Arc<dyn Fn(&Lua) -> Result<VmState>>;
+pub(crate) type InterruptCallback = Arc<dyn Fn() -> Result<VmState>>;
#[cfg(all(feature = "send", feature = "lua54"))]
pub(crate) type WarnCallback = Box<dyn Fn(&Lua, &CStr, bool) -> Result<()> + Send>;