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

Function resume_query_loop

library/LuaTools.cpp:1180–1194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178 */
1179
1180static int resume_query_loop(color_ostream &out,
1181 lua_State *thread, lua_State *state, int nargs,
1182 std::string &prompt, std::string &histfile)
1183{
1184 int rv = Lua::SafeResume(out, state, thread, nargs, 2);
1185
1186 if (Lua::IsSuccess(rv))
1187 {
1188 prompt = ifnull(lua_tostring(state, -2), "");
1189 histfile = ifnull(lua_tostring(state, -1), "");
1190 lua_pop(state, 2);
1191 }
1192
1193 return rv;
1194}
1195
1196bool DFHack::Lua::RunCoreQueryLoop(color_ostream &out, lua_State *state, DFHack::Lua::init_fn init)
1197{

Callers 1

RunCoreQueryLoopMethod · 0.85

Calls 2

IsSuccessFunction · 0.85
ifnullFunction · 0.85

Tested by

no test coverage detected