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

Method QueryParentThread

emmy_debugger/src/debugger/extension_point.cpp:205–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205lua_State* ExtensionPoint::QueryParentThread(lua_State* L)
206{
207 lua_State* PL = nullptr;
208 const int t = lua_gettop(L);
209 lua_getglobal(L, ExtensionTable.c_str());
210 if (lua_istable(L, -1))
211 {
212 lua_getfield(L, -1, "queryParentThread");
213 if (lua_isfunction(L, -1))
214 {
215 const auto r = lua_pcall(L, 0, 1, 0);
216 if (r == LUA_OK)
217 {
218 PL = lua_tothread(L, -1);
219 }
220 }
221 }
222 lua_settop(L, t);
223
224 return PL;
225}

Callers 2

GetStacksMethod · 0.80
DoEvalMethod · 0.80

Calls 6

lua_gettopFunction · 0.50
lua_getglobalFunction · 0.50
lua_getfieldFunction · 0.50
lua_pcallFunction · 0.50
lua_tothreadFunction · 0.50
lua_settopFunction · 0.50

Tested by

no test coverage detected