MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / PushCallInInfo

Function PushCallInInfo

src/lua/LuaHandle.cpp:516–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514//============================================================================//
515
516static void PushCallInInfo(lua_State* L, const LuaCallInDB::CallInInfo& ciInfo) {
517 lua_newtable(L);
518 luaset_strint(L, "code", ciInfo.code);
519 luaset_strbool(L, "reqFullRead", ciInfo.reqFullRead);
520 luaset_strbool(L, "reqInputCtrl", ciInfo.reqInputCtrl);
521 luaset_strbool(L, "reversed", ciInfo.reversed);
522 luaset_strbool(L, "reentrant", ciInfo.reentrant);
523 luaset_strstr(L, "loopType", ciInfo.loopType);
524 if (LuaHandle::GetDevMode()) {
525 lua_pushliteral(L, "func");
526 lua_rawgeti(L, LUA_CALLINSINDEX, ciInfo.code);
527 if (!lua_isfunction(L, -1)) {
528 lua_pop(L, 1);
529 lua_pushboolean(L, false);
530 }
531 lua_rawset(L, -3);
532 }
533}
534
535
536int LuaHandle::ScriptGetCallInInfo(lua_State* L) {

Callers 1

ScriptGetCallInInfoMethod · 0.85

Calls 6

luaset_strintFunction · 0.85
luaset_strboolFunction · 0.85
luaset_strstrFunction · 0.85
lua_rawgetiFunction · 0.50
lua_pushbooleanFunction · 0.50
lua_rawsetFunction · 0.50

Tested by

no test coverage detected