MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / executeReturn

Method executeReturn

Source/Lua/LuaEngine.cpp:1804–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1802}
1803
1804void LuaEngine::executeReturn(LuaHandler*& luaHandler, int handler, int paramCount) {
1805 int top = lua_gettop(L) - paramCount;
1806 DEFER(lua_settop(L, top));
1807 if (LuaEngine::invoke(L, handler, paramCount, 1)) {
1808 int funcRef = tolua_ref_function(L, -1);
1809 if (funcRef > 0) {
1810 luaHandler = LuaHandler::create(funcRef);
1811 } else {
1812 Error("Lua callback should return another function.");
1813 }
1814 }
1815}
1816
1817bool LuaEngine::isInLua() {
1818 return _callFromLua > 0;

Callers 3

operator()Method · 0.45
operator()Method · 0.45
HttpServer_postScheduleFunction · 0.45

Calls 5

tolua_ref_functionFunction · 0.85
createFunction · 0.70
lua_gettopFunction · 0.50
lua_settopFunction · 0.50
ErrorEnum · 0.50

Tested by

no test coverage detected