Skip to content

Commit 97e14f6

Browse files
committed
This is a missing argcheck, add it back in as a comment
1 parent 933c5ca commit 97e14f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lbaselib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ unsafe extern "C" fn luaB_getmetatable(L: *mut lua_State) -> c_int {
166166
}
167167

168168
unsafe extern "C" fn luaB_setmetatable(L: *mut lua_State) -> c_int {
169+
let _t = lua_type(L, 2);
169170
luaL_checktype(L, 1, LUA_TTABLE);
171+
// FIXME
172+
//luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,
173+
// "nil or table expected");
170174
if luaL_getmetafield(L, 1, cstr!("__metatable")) != LUA_TNIL {
171175
luaL_error(L, cstr!("cannot change a protected metatable"));
172176
}

0 commit comments

Comments
 (0)