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

Function init_nhc_data

src/nhlua.c:1923–1937  ·  view source on GitHub ↗

register and init the constants table */

Source from the content-addressed store, hash-verified

1921
1922/* register and init the constants table */
1923staticfn void
1924init_nhc_data(lua_State *L)
1925{
1926 int i;
1927
1928 lua_newtable(L);
1929
1930 for (i = 0; nhl_consts[i].name; i++) {
1931 lua_pushstring(L, nhl_consts[i].name);
1932 lua_pushinteger(L, nhl_consts[i].value);
1933 lua_rawset(L, -3);
1934 }
1935
1936 lua_setglobal(L, "nhc");
1937}
1938
1939staticfn int
1940nhl_push_anything(lua_State *L, int anytype, void *src)

Callers 1

nhl_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected