MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / name_space

Method name_space

ogsr_engine/COMMON_AI/script_engine.cpp:729–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727}
728
729luabind::object CScriptEngine::name_space(const char* namespace_name)
730{
731 string256 S1;
732 xr_strcpy(S1, namespace_name);
733 auto S = S1;
734
735 auto lua_namespace = luabind::get_globals(lua());
736
737 for (;;)
738 {
739 if (!xr_strlen(S))
740 return lua_namespace;
741 auto I = strchr(S, '.');
742 if (!I)
743 return lua_namespace[S];
744 *I = 0;
745 lua_namespace = lua_namespace[S];
746 S = I + 1;
747 }
748}
749
750bool CScriptEngine::print_output(lua_State* L, const char* caScriptFileName,
751 int errorCode) // KRodin: вызывается из нескольких мест, в т.ч. из калбеков lua_error, lua_pcall_failed, lua_cast_failed, lua_panic

Callers 1

function_objectMethod · 0.95

Calls 3

get_globalsFunction · 0.85
luaFunction · 0.85
xr_strlenFunction · 0.50

Tested by

no test coverage detected