Some changes for panic correctness, stack usage correctness, and speed

This commit is contained in:
kyren
2018-02-12 13:42:13 -05:00
parent c4b3170e2b
commit c22aae461b
8 changed files with 34 additions and 36 deletions
+1 -1
View File
@@ -470,7 +470,7 @@ impl<'lua> AnyUserData<'lua> {
let lua = self.0.lua;
unsafe {
stack_err_guard(lua.state, 0, || {
check_stack(lua.state, 2);
check_stack(lua.state, 3);
lua.push_ref(lua.state, &self.0);
ffi::lua_getuservalue(lua.state, -1);
let res = V::from_lua(lua.pop_value(lua.state), lua)?;