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

Function init_interpreter

library/LuaTools.cpp:1284–1292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282}
1283
1284static bool init_interpreter(color_ostream &out, lua_State *state, const char* prompt, const char* hfile)
1285{
1286 lua_rawgetp(state, LUA_REGISTRYINDEX, &DFHACK_DFHACK_TOKEN);
1287 lua_getfield(state, -1, "interpreter");
1288 lua_remove(state, -2);
1289 lua_pushstring(state, prompt);
1290 lua_pushstring(state, hfile);
1291 return true;
1292}
1293
1294bool DFHack::Lua::InterpreterLoop(color_ostream &out, lua_State *state,
1295 const char *prompt, const char *hfile)

Callers

nothing calls this directly

Calls 3

lua_rawgetpFunction · 0.85
lua_getfieldFunction · 0.85
lua_pushstringFunction · 0.85

Tested by

no test coverage detected