diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-06-17 11:18:09 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-06-17 11:18:09 -0400 |
commit | 5b6a5c757deaba3c2b361eb49f2e61630fe3eb47 (patch) | |
tree | 14e69fcce05d56625bd16082d54f55909c33d72a /indra/newview/llagentpilot.cpp | |
parent | ab9cb6fcd96c1c29650d844b5fd76e2ebbf5f2df (diff) |
Store script's LuaListener in userdata in lua_State's Registry.
Instead of deriving LuaListener from LLInstanceTracker with an int key,
generating a unique int key and storing that key in the Registry, use new
lua_emplace<LuaState>() to store the LuaListener directly in a Lua userdata
object in the Lua Registry.
Because lua_emplace<T>() uses LL.atexit() to guarantee that ~LuaState will
destroy the T object, we no longer need ~LuaState() to make a special call
specifically to destroy the LuaListener, if any. So we no longer need
LuaState::getListener() separate from obtainListener().
Since LuaListener is no longer an LLInstanceTracker subclass, make
LuaState::obtainListener() return LuaListener& rather than LuaListener::ptr_t.
Diffstat (limited to 'indra/newview/llagentpilot.cpp')
0 files changed, 0 insertions, 0 deletions