[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: newproxy
- From: Mark Hamburg <mark@...>
- Date: Sun, 8 Aug 2010 14:00:30 -0700
Why not the following function instead:
function newproxy2( meta, env ) -- returns a userdata with the given metatable and environment (user value in 5.2)
The existing approach of creating a userdata with a metatable and then using getmetatable to access it for further modification seems rather convoluted and also doesn't allow one to exploit the ability to hang a Lua table off of the userdata.
Mark