| 1178 | */ |
| 1179 | |
| 1180 | static 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 | |
| 1196 | bool DFHack::Lua::RunCoreQueryLoop(color_ostream &out, lua_State *state, DFHack::Lua::init_fn init) |
| 1197 | { |
no test coverage detected