diff --git a/mlua-sys/src/lua52/compat.rs b/mlua-sys/src/lua52/compat.rs index 2d9d7ae..4cddd43 100644 --- a/mlua-sys/src/lua52/compat.rs +++ b/mlua-sys/src/lua52/compat.rs @@ -125,7 +125,7 @@ pub unsafe fn lua_rawget(L: *mut lua_State, idx: c_int) -> c_int { #[inline(always)] pub unsafe fn lua_rawgeti(L: *mut lua_State, idx: c_int, n: lua_Integer) -> c_int { - let n = n.try_into().expect("cannot convert index to lua_Integer"); + let n = n.try_into().expect("cannot convert index to c_int"); lua_rawgeti_(L, idx, n); lua_type(L, -1) } @@ -153,7 +153,7 @@ pub unsafe fn lua_seti(L: *mut lua_State, mut idx: c_int, n: lua_Integer) { #[inline(always)] pub unsafe fn lua_rawseti(L: *mut lua_State, idx: c_int, n: lua_Integer) { - let n = n.try_into().expect("cannot convert index from lua_Integer"); + let n = n.try_into().expect("cannot convert index to c_int"); lua_rawseti_(L, idx, n) } diff --git a/mlua-sys/src/lua52/lauxlib.rs b/mlua-sys/src/lua52/lauxlib.rs index 2704f1c..6835c0f 100644 --- a/mlua-sys/src/lua52/lauxlib.rs +++ b/mlua-sys/src/lua52/lauxlib.rs @@ -166,8 +166,6 @@ pub unsafe fn luaL_getmetatable(L: *mut lua_State, n: *const c_char) { lua::lua_getfield_(L, lua::LUA_REGISTRYINDEX, n); } -// luaL_opt would be implemented here but it is undocumented, so it's omitted - #[inline(always)] pub unsafe fn luaL_loadbuffer(L: *mut lua_State, s: *const c_char, sz: usize, n: *const c_char) -> c_int { luaL_loadbufferx(L, s, sz, n, ptr::null())