avoid some warnings

This commit is contained in:
Roberto Ierusalimschy
2005-10-19 11:05:11 -02:00
parent 5511bf6b9d
commit ed7039024d
4 changed files with 11 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.152 2005/09/06 17:20:11 roberto Exp roberto $
** $Id: lauxlib.c,v 1.153 2005/10/03 14:36:45 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -305,7 +305,7 @@ LUALIB_API int luaL_getn (lua_State *L, int t) {
if ((n = checkint(L, 2)) >= 0) return n;
lua_getfield(L, t, "n"); /* else try t.n */
if ((n = checkint(L, 1)) >= 0) return n;
return lua_objlen(L, t);
return (int)lua_objlen(L, t);
}
#endif
@@ -470,7 +470,7 @@ LUALIB_API int luaL_ref (lua_State *L, int t) {
lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */
}
else { /* no free elements */
ref = lua_objlen(L, t);
ref = (int)lua_objlen(L, t);
ref++; /* create new reference */
}
lua_rawseti(L, t, ref);