| 383 | } |
| 384 | |
| 385 | sol::environment LuaState::newInternalLibEnvironment() |
| 386 | { |
| 387 | // TODO |
| 388 | sol::environment env(mSol, sol::create, mSandboxEnv); |
| 389 | sol::table loaded(mSol, sol::create); |
| 390 | for (const std::string& s : safePackages) |
| 391 | loaded[s] = static_cast<sol::object>(mSandboxEnv[s]); |
| 392 | env["require"] = mSol["requireGen"](env, loaded, mSol["loadInternalLib"]); |
| 393 | return env; |
| 394 | } |
| 395 | |
| 396 | sol::protected_function_result LuaState::throwIfError(sol::protected_function_result&& res) |
| 397 | { |
no outgoing calls
no test coverage detected