[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua addition proposal: Userdata as function environment
- From: Sam Roberts <sroberts@...>
- Date: Wed, 4 Oct 2006 14:38:57 -0700
On Wed, Oct 04, 2006 at 03:24:53PM -0500, Rici Lake wrote:
> Why not just use an empty table whose __index and __newindex methods
> use the userdata? In effect, they could be the same __index and
> __newindex metamethods you would use with the userdata.
>
> The following hardly changes your example at all:
>
> (Note: I'm using lightuserdata here, something I would normally never
> do, but you don't seem to be attaching a __gc metamethod to your
I'm confused. I thought lightuserdata doesn't have an individual
metatable?
Sam