MCPcopy Create free account
hub / github.com/DFHack/dfhack / ipairsaux

Function ipairsaux

depends/lua/src/lbaselib.c:246–250  ·  view source on GitHub ↗

** Traversal function for 'ipairs' */

Source from the content-addressed store, hash-verified

244** Traversal function for 'ipairs'
245*/
246static int ipairsaux (lua_State *L) {
247 lua_Integer i = luaL_checkinteger(L, 2) + 1;
248 lua_pushinteger(L, i);
249 return (lua_geti(L, 1, i) == LUA_TNIL) ? 1 : 2;
250}
251
252
253/*

Callers

nothing calls this directly

Calls 3

luaL_checkintegerFunction · 0.85
lua_pushintegerFunction · 0.85
lua_getiFunction · 0.85

Tested by

no test coverage detected