Skip to content

Commit 5c54361

Browse files
committed
Keep stack in FromLuaMulti::from_stack_multi
1 parent ec227f9 commit 5c54361

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/multi.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,7 @@ macro_rules! impl_tuple {
287287
}
288288

289289
#[inline]
290-
unsafe fn from_stack_multi(nvals: c_int, lua: &RawLua) -> Result<Self> {
291-
if nvals > 0 {
292-
ffi::lua_pop(lua.state(), nvals);
293-
}
290+
unsafe fn from_stack_multi(_nvals: c_int, _lua: &RawLua) -> Result<Self> {
294291
Ok(())
295292
}
296293
}

src/traits.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ pub trait FromLuaMulti: Sized {
128128
for idx in 0..nvals {
129129
values.push_back(lua.stack_value(-nvals + idx, None));
130130
}
131-
if nvals > 0 {
132-
// It's safe to clear the stack as all references moved to ref thread
133-
ffi::lua_pop(lua.state(), nvals);
134-
}
135131
Self::from_lua_multi(values, lua.lua())
136132
}
137133

0 commit comments

Comments
 (0)