| 1331 | } |
| 1332 | |
| 1333 | void LuaDetail::shallowCopy(lua_State* state, int sourceIndex, int targetIndex) { |
| 1334 | lua_checkstack(state, 3); |
| 1335 | |
| 1336 | int absSourceIndex = lua_absindex(state, sourceIndex); |
| 1337 | int absTargetIndex = lua_absindex(state, targetIndex); |
| 1338 | |
| 1339 | lua_pushnil(state); |
| 1340 | while (lua_next(state, absSourceIndex) != 0) { |
| 1341 | lua_pushvalue(state, -2); |
| 1342 | lua_insert(state, -2); |
| 1343 | lua_rawset(state, absTargetIndex); |
| 1344 | } |
| 1345 | } |
| 1346 | |
| 1347 | LuaTable LuaDetail::insertJsonMetatable(LuaEngine& engine, LuaTable const& table, Json::Type type) { |
| 1348 | auto newIndexMetaMethod = [](LuaTable const& table, LuaValue const& key, LuaValue const& value) { |
nothing calls this directly
no test coverage detected