lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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