Skip to content

Commit 0fd1bc3

Browse files
committed
WIP portability
1 parent 5bddac9 commit 0fd1bc3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/function.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pub struct FunctionInfo {
5757
#[cfg(any(not(feature = "lua51"), doc))]
5858
pub is_vararg: bool,
5959
/// Number of upvalues
60+
#[cfg(any(not(feature = "luau"), doc))]
6061
pub nups: usize,
6162
}
6263

@@ -363,7 +364,7 @@ impl Function {
363364

364365
let mut ar: ffi::lua_Debug = mem::zeroed();
365366
lua.push_ref(&self.0);
366-
#[cfg(not(feature = "luau"))] // TODO: cfg for u
367+
#[cfg(not(feature = "luau"))]
367368
let res = ffi::lua_getinfo(state, cstr!(">Snu"), &mut ar);
368369
#[cfg(feature = "luau")]
369370
let res = ffi::lua_getinfo(state, -1, cstr!("sn"), &mut ar);
@@ -393,6 +394,7 @@ impl Function {
393394
num_params: ar.nparams as _,
394395
#[cfg(not(feature = "lua51"))]
395396
is_vararg: ar.isvararg != 0,
397+
#[cfg(not(feature = "luau"))]
396398
nups: ar.nups as _,
397399
}
398400
}

0 commit comments

Comments
 (0)