summaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-10-19 11:05:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-10-19 11:05:11 -0200
commited7039024d32778a62fd52a98fe98f3e38133853 (patch)
tree3c374aa6d13a0be4698f57088287b4ffd0d2b145 /lauxlib.c
parent5511bf6b9d6018665f5c184c5a464bb8b0aceca5 (diff)
downloadlua-ed7039024d32778a62fd52a98fe98f3e38133853.tar.gz
lua-ed7039024d32778a62fd52a98fe98f3e38133853.tar.bz2
lua-ed7039024d32778a62fd52a98fe98f3e38133853.zip
avoid some warnings
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 900f14b9..84f13cb4 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.152 2005/09/06 17:20:11 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.153 2005/10/03 14:36:45 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -305,7 +305,7 @@ LUALIB_API int luaL_getn (lua_State *L, int t) {
305 if ((n = checkint(L, 2)) >= 0) return n; 305 if ((n = checkint(L, 2)) >= 0) return n;
306 lua_getfield(L, t, "n"); /* else try t.n */ 306 lua_getfield(L, t, "n"); /* else try t.n */
307 if ((n = checkint(L, 1)) >= 0) return n; 307 if ((n = checkint(L, 1)) >= 0) return n;
308 return lua_objlen(L, t); 308 return (int)lua_objlen(L, t);
309} 309}
310 310
311#endif 311#endif
@@ -470,7 +470,7 @@ LUALIB_API int luaL_ref (lua_State *L, int t) {
470 lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */ 470 lua_rawseti(L, t, FREELIST_REF); /* (t[FREELIST_REF] = t[ref]) */
471 } 471 }
472 else { /* no free elements */ 472 else { /* no free elements */
473 ref = lua_objlen(L, t); 473 ref = (int)lua_objlen(L, t);
474 ref++; /* create new reference */ 474 ref++; /* create new reference */
475 } 475 }
476 lua_rawseti(L, t, ref); 476 lua_rawseti(L, t, ref);