| 727 | } |
| 728 | |
| 729 | luabind::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 | |
| 750 | bool CScriptEngine::print_output(lua_State* L, const char* caScriptFileName, |
| 751 | int errorCode) // KRodin: вызывается из нескольких мест, в т.ч. из калбеков lua_error, lua_pcall_failed, lua_cast_failed, lua_panic |
no test coverage detected