Skip to content

Commit 141d29e

Browse files
committed
lbaselib cleanup
1 parent 3977b53 commit 141d29e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lbaselib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ 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);
170-
// TODO: FIX
171-
luaL_checktype(L, 1, LUA_TTABLE); // FIXME? t is unused?
169+
luaL_checktype(L, 1, LUA_TTABLE);
172170
if luaL_getmetafield(L, 1, cstr!("__metatable")) != LUA_TNIL {
173171
return luaL_error(L, cstr!("cannot change a protected metatable"));
174172
}
@@ -396,7 +394,7 @@ unsafe extern "C" fn generic_reader(
396394
}
397395

398396
unsafe extern "C" fn luaB_load(L: *mut lua_State) -> c_int {
399-
let status;
397+
let status: c_int;
400398
let mut l: size_t = 0;
401399
let s = lua_tolstring(L, 1 as c_int, &mut l);
402400
let mode = luaL_optstring(L, 3, cstr!("bt"));

0 commit comments

Comments
 (0)