| 81 | } |
| 82 | |
| 83 | void FObjectRegistry::Push(lua_State* L, UObject* Object) |
| 84 | { |
| 85 | if (!Object) |
| 86 | { |
| 87 | lua_pushnil(L); |
| 88 | return; |
| 89 | } |
| 90 | |
| 91 | lua_getfield(L, LUA_REGISTRYINDEX, REGISTRY_KEY); |
| 92 | lua_pushlightuserdata(L, Object); |
| 93 | const auto Type = lua_rawget(L, -2); |
| 94 | if (Type == LUA_TNIL) |
| 95 | { |
| 96 | lua_pop(L, 1); |
| 97 | PushObjectCore(L, Object); |
| 98 | lua_pushlightuserdata(L, Object); |
| 99 | lua_pushvalue(L, -2); |
| 100 | lua_rawset(L, -4); |
| 101 | ObjectRefs.Add(Object, LUA_NOREF); |
| 102 | } |
| 103 | lua_remove(L, -2); |
| 104 | } |
| 105 | |
| 106 | int FObjectRegistry::Bind(UObject* Object) |
| 107 | { |
nothing calls this directly
no test coverage detected