| 428 | } |
| 429 | |
| 430 | sol::function LuaState::loadInternalLib(std::string_view libName) |
| 431 | { |
| 432 | const auto path = packageNameToPath(libName, mLibSearchPaths); |
| 433 | std::ifstream stream(path); |
| 434 | std::string fileContent(std::istreambuf_iterator<char>(stream), {}); |
| 435 | sol::load_result res = mSol.load(fileContent, Files::pathToUnicodeString(path), sol::load_mode::text); |
| 436 | if (!res.valid()) |
| 437 | throw std::runtime_error("Lua error: " + res.get<std::string>()); |
| 438 | return res; |
| 439 | } |
| 440 | |
| 441 | std::string getLuaVersion() |
| 442 | { |
no test coverage detected