aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 2e04a9a4..262e80ca 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.135 2003/10/10 12:57:55 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.136 2003/10/23 18:06:22 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -218,7 +218,7 @@ static int luaB_next (lua_State *L) {
218 218
219static int luaB_pairs (lua_State *L) { 219static int luaB_pairs (lua_State *L) {
220 luaL_checktype(L, 1, LUA_TTABLE); 220 luaL_checktype(L, 1, LUA_TTABLE);
221 lua_getfield(L, LUA_GLOBALSINDEX, "next"); /* return generator, */ 221 lua_getglobal(L, "next"); /* return generator, */
222 lua_pushvalue(L, 1); /* state, */ 222 lua_pushvalue(L, 1); /* state, */
223 lua_pushnil(L); /* and initial value */ 223 lua_pushnil(L); /* and initial value */
224 return 3; 224 return 3;
@@ -229,7 +229,7 @@ static int luaB_ipairs (lua_State *L) {
229 int i = (int)lua_tointeger(L, 2); 229 int i = (int)lua_tointeger(L, 2);
230 luaL_checktype(L, 1, LUA_TTABLE); 230 luaL_checktype(L, 1, LUA_TTABLE);
231 if (i == 0 && lua_isnone(L, 2)) { /* `for' start? */ 231 if (i == 0 && lua_isnone(L, 2)) { /* `for' start? */
232 lua_getfield(L, LUA_GLOBALSINDEX, "ipairs"); /* return generator, */ 232 lua_getglobal(L, "ipairs"); /* return generator, */
233 lua_pushvalue(L, 1); /* state, */ 233 lua_pushvalue(L, 1); /* state, */
234 lua_pushinteger(L, 0); /* and initial value */ 234 lua_pushinteger(L, 0); /* and initial value */
235 return 3; 235 return 3;