MCPcopy Create free account
hub / github.com/NetHack/NetHack / nhl_clearfromtable

Function nhl_clearfromtable

src/nhlua.c:2607–2619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2605 nhl_clearfromtable(L, !!(lflags & flag), lib, ct)
2606
2607staticfn void
2608nhl_clearfromtable(lua_State *L, int flag, int tndx, struct e *todo)
2609{
2610 while (todo->when != EOT) {
2611 lua_pushnil(L);
2612 /* if we load the library at all, NEVER items must be erased
2613 * and IFFLAG items should be erased if !flag */
2614 if (todo->when == NEVER || !flag) {
2615 lua_setfield(L, tndx, todo->fnname);
2616 }
2617 todo++;
2618 }
2619}
2620#endif
2621
2622/*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected