| 169 | } |
| 170 | |
| 171 | sol::table LuaStorage::initGlobalPackage(LuaUtil::LuaView& view, LuaStorage* globalStorage) |
| 172 | { |
| 173 | sol::table res(view.sol(), sol::create); |
| 174 | registerLifeTime(view, res); |
| 175 | |
| 176 | res["globalSection"] = [globalStorage](sol::this_state lua, std::string_view section) { |
| 177 | return globalStorage->getMutableSection(lua, section); |
| 178 | }; |
| 179 | res["allGlobalSections"] = [globalStorage](sol::this_state lua) { return globalStorage->getAllSections(lua); }; |
| 180 | return LuaUtil::makeReadOnly(res); |
| 181 | } |
| 182 | |
| 183 | sol::table LuaStorage::initLocalPackage(LuaUtil::LuaView& view, LuaStorage* globalStorage) |
| 184 | { |
nothing calls this directly
no test coverage detected