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

Function dfhack_event_next

library/LuaTools.cpp:1578–1592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1576}
1577
1578static int dfhack_event_next(lua_State *L)
1579{
1580 luaL_checktype(L, 1, LUA_TUSERDATA);
1581 lua_getuservalue(L, 1);
1582 lua_pushvalue(L, 2);
1583 while (lua_next(L, -2))
1584 {
1585 if (is_null_userdata(L, -2))
1586 lua_pop(L, 1);
1587 else
1588 return 2;
1589 }
1590 lua_pushnil(L);
1591 return 1;
1592}
1593
1594static int dfhack_event_pairs(lua_State *L)
1595{

Callers

nothing calls this directly

Calls 6

luaL_checktypeFunction · 0.85
lua_getuservalueFunction · 0.85
lua_pushvalueFunction · 0.85
lua_nextFunction · 0.85
is_null_userdataFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected