aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-04-03 10:35:34 -0300
commit0d88545b82b82671904474499b5d312141170ab6 (patch)
tree5a924d4d492dd987a5480a15cd1d12947089db85 /ltablib.c
parentf84c5a5fc68f83b3adad37919e0096ea3c7f4129 (diff)
downloadlua-0d88545b82b82671904474499b5d312141170ab6.tar.gz
lua-0d88545b82b82671904474499b5d312141170ab6.tar.bz2
lua-0d88545b82b82671904474499b5d312141170ab6.zip
warnings from several compilers (mainly typecasts when lua_Number is float)
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltablib.c b/ltablib.c
index 49475145..39447e29 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.19 2003/01/27 13:46:16 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.20 2003/03/11 12:24:34 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -24,7 +24,7 @@ static int luaB_foreachi (lua_State *L) {
24 luaL_checktype(L, 2, LUA_TFUNCTION); 24 luaL_checktype(L, 2, LUA_TFUNCTION);
25 for (i=1; i<=n; i++) { 25 for (i=1; i<=n; i++) {
26 lua_pushvalue(L, 2); /* function */ 26 lua_pushvalue(L, 2); /* function */
27 lua_pushnumber(L, i); /* 1st argument */ 27 lua_pushnumber(L, (lua_Number)i); /* 1st argument */
28 lua_rawgeti(L, 1, i); /* 2nd argument */ 28 lua_rawgeti(L, 1, i); /* 2nd argument */
29 lua_call(L, 2, 1); 29 lua_call(L, 2, 1);
30 if (!lua_isnil(L, -1)) 30 if (!lua_isnil(L, -1))
@@ -54,7 +54,7 @@ static int luaB_foreach (lua_State *L) {
54 54
55 55
56static int luaB_getn (lua_State *L) { 56static int luaB_getn (lua_State *L) {
57 lua_pushnumber(L, aux_getn(L, 1)); 57 lua_pushnumber(L, (lua_Number)aux_getn(L, 1));
58 return 1; 58 return 1;
59} 59}
60 60