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

Function wtype_inext

library/LuaWrapper.cpp:1354–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354static int wtype_inext(lua_State *L)
1355{
1356 int i = luaL_checkint(L, 2);
1357 i++; /* next value */
1358 if (i <= lua_tointeger(L, lua_upvalueindex(2)))
1359 {
1360 lua_pushinteger(L, i);
1361 lua_rawgeti(L, lua_upvalueindex(1), i);
1362 return 2;
1363 }
1364 else
1365 {
1366 lua_pushnil(L);
1367 return 1;
1368 }
1369}
1370
1371static int wtype_ipairs(lua_State *state)
1372{

Callers

nothing calls this directly

Calls 3

lua_pushintegerFunction · 0.85
lua_rawgetiFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected