[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.2: userdata environment tables gone?
- From: Josh Haberman <haberman@...>
- Date: Sat, 24 Dec 2011 19:10:00 -0800
I hadn't been tracking the Lua 5.2 changes too closely, but I just noticed that lua_getfenv()/lua_setfenv() are gone. I had been using userdata environment tables as a way of letting a userdata reference other Lua values. I had previously been advised that giving each userdata its own metatable and mutating those metatables frequently would have bad performance consequences (see http://lua-users.org/lists/lua-l/2011-04/msg00319.html)
What's the Lua 5.2 way of letting a userdata contain references to other Lua values?
Thanks,
Josh