MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / CheckDoString

Method CheckDoString

emmy_debugger/src/debugger/emmy_debugger.cpp:875–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875void Debugger::CheckDoString() {
876 if (!currentL) {
877 return;
878 }
879
880 auto L = currentL;
881
882
883 if (!doStringList.empty()) {
884 const auto skip = skipHook;
885 skipHook = true;
886 const int t = lua_gettop(L);
887 for (const auto &code: doStringList) {
888 const int r = luaL_loadstring(L, code.c_str());
889 if (r == LUA_OK) {
890 lua_pcall(L, 0, 0, 0);
891 }
892 lua_settop(L, t);
893 }
894 skipHook = skip;
895 assert(lua_gettop(L) == t);
896 doStringList.clear();
897 }
898}
899
900// message thread
901bool Debugger::Eval(std::shared_ptr<EvalContext> evalContext, bool force) {

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.50
luaL_loadstringFunction · 0.50
lua_pcallFunction · 0.50
lua_settopFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected