diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2020-06-07 19:10:46 +0100 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2020-06-07 20:38:19 +0100 |
commit | efcaef3db76e8e3b3a7f8e36805126d310543ee4 (patch) | |
tree | ecd42c764c7e594bc179bfed883025bcaefdc405 /src/hook.rs | |
parent | 0a13a9631d527e811d84920b575f4592fce958ae (diff) | |
download | mlua-efcaef3db76e8e3b3a7f8e36805126d310543ee4.zip |
Enable hooks support for LuaJIT
Diffstat (limited to 'src/hook.rs')
-rw-r--r-- | src/hook.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/hook.rs b/src/hook.rs index bf3a26c..02e96cb 100644 --- a/src/hook.rs +++ b/src/hook.rs @@ -1,8 +1,3 @@ -#![cfg_attr( - not(any(feature = "lua54", feature = "lua53", feature = "lua52", feature = "lua51")), - allow(dead_code) -)] - use std::ffi::CStr; use std::marker::PhantomData; use std::os::raw::{c_char, c_int}; @@ -18,8 +13,6 @@ use crate::util::callback_error; /// Lua code executing at the time that the hook function was called. Further information can be /// found in the [Lua 5.3 documentaton][lua_doc]. /// -/// Requires `feature = "lua54/lua53/lua52/lua51"` -/// /// [lua_doc]: https://www.lua.org/manual/5.3/manual.html#lua_Debug /// [`Lua::set_hook`]: struct.Lua.html#method.set_hook #[derive(Clone)] @@ -93,9 +86,9 @@ impl<'a> Debug<'a> { ); DebugStack { num_ups: (*self.ar).nups as i32, - #[cfg(any(feature = "lua52", feature = "lua53", feature = "lua54"))] + #[cfg(any(feature = "lua54", feature = "lua53", feature = "lua52"))] num_params: (*self.ar).nparams as i32, - #[cfg(any(feature = "lua52", feature = "lua53", feature = "lua54"))] + #[cfg(any(feature = "lua54", feature = "lua53", feature = "lua52"))] is_vararg: (*self.ar).isvararg != 0, } } @@ -129,8 +122,6 @@ pub struct DebugStack { } /// Determines when a hook function will be called by Lua. -/// -/// Requires `feature = "lua54/lua53/lua52/lua51"` #[derive(Clone, Copy, Debug, Default)] pub struct HookTriggers { /// Before a function call. |