diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-10 10:26:42 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-10 10:26:42 -0200 |
| commit | 27ab59bc16ab5da69c60dba220124072a6e0d774 (patch) | |
| tree | 380bd8f5bef110895b0e07cc46a4f1818055af0c | |
| parent | bd8ce7e33188502fe8d42d3dcf29e52eb164fcf6 (diff) | |
| download | lua-27ab59bc16ab5da69c60dba220124072a6e0d774.tar.gz lua-27ab59bc16ab5da69c60dba220124072a6e0d774.tar.bz2 lua-27ab59bc16ab5da69c60dba220124072a6e0d774.zip | |
'ipairs' needs an argument
| -rw-r--r-- | lbaselib.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -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 */ |
