Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lua_pushnil(state);
- while (lua_next(state, LUA_GLOBALSINDEX) != 0)
- {
- dump_stack(state, "start...");
- if (lua_type(state, -2) == LUA_TSTRING)
- {
- const char* k = lua_tostring(state, -2);
- printf("unloading %s\n", k);
- dump_stack(state, "after get key...")
- SharedValue newValue = LuaUtils::ToKrollValue(state); // pops value and converts
- dump_stack(state, "after get value...");
- SharedValue existingValue = window_global->Get(k);
- if (!newValue->Equals(existingValue))
- {
- window_global->Set(k, newValue);
- }
- }
- else
- {
- lua_pop(state, 1);
- }
- dump_stack(state, "end");
- }
Add Comment
Please, Sign In to add comment