aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-10 10:26:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-12-10 10:26:42 -0200
commit27ab59bc16ab5da69c60dba220124072a6e0d774 (patch)
tree380bd8f5bef110895b0e07cc46a4f1818055af0c
parentbd8ce7e33188502fe8d42d3dcf29e52eb164fcf6 (diff)
downloadlua-27ab59bc16ab5da69c60dba220124072a6e0d774.tar.gz
lua-27ab59bc16ab5da69c60dba220124072a6e0d774.tar.bz2
lua-27ab59bc16ab5da69c60dba220124072a6e0d774.zip
'ipairs' needs an argument
-rw-r--r--lbaselib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 902143ea..f3b0a577 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.307 2014/11/10 14:25:52 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.308 2014/12/08 15:26:55 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*/
@@ -274,6 +274,7 @@ static int luaB_ipairs (lua_State *L) {
274#if defined(LUA_COMPAT_IPAIRS) 274#if defined(LUA_COMPAT_IPAIRS)
275 return pairsmeta(L, "__ipairs", 1, iter); 275 return pairsmeta(L, "__ipairs", 1, iter);
276#else 276#else
277 luaL_checkany(L, 1);
277 lua_pushcfunction(L, iter); /* iteration function */ 278 lua_pushcfunction(L, iter); /* iteration function */
278 lua_pushvalue(L, 1); /* state */ 279 lua_pushvalue(L, 1); /* state */
279 lua_pushinteger(L, 0); /* initial value */ 280 lua_pushinteger(L, 0); /* initial value */