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

Function luaX_init

depends/lua/src/llex.c:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69
70void luaX_init (lua_State *L) {
71 int i;
72 TString *e = luaS_newliteral(L, LUA_ENV); /* create env name */
73 luaC_fix(L, obj2gco(e)); /* never collect this name */
74 for (i=0; i<NUM_RESERVED; i++) {
75 TString *ts = luaS_new(L, luaX_tokens[i]);
76 luaC_fix(L, obj2gco(ts)); /* reserved words are never collected */
77 ts->extra = cast_byte(i+1); /* reserved word */
78 }
79}
80
81
82const char *luaX_token2str (LexState *ls, int token) {

Callers 1

f_luaopenFunction · 0.85

Calls 2

luaC_fixFunction · 0.85
luaS_newFunction · 0.85

Tested by

no test coverage detected