diff options
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 | ||
56 | static int luaB_getn (lua_State *L) { | 56 | static 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 | ||