[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Userdata environment example (Re: GC method for objects)
- From: Mike Pall <mikelu-0504@...>
- Date: Mon, 25 Apr 2005 00:14:12 +0200
Hi,
I wrote:
> [Umm ... I just noticed a restriction in lua_setfenv() that the
> environment must be a table and cannot be any arbitrary Lua object.
> While this makes sense for Lua functions, it removes some flexibility
> for C functions and userdata objects. Maybe this was done for
> consistency? Roberto?]
Uh, sorry. Forget this. It's a Table * and not a TValue (i.e. it
takes less space than a C function with a single upvalue previously
took).
[And no, I think the flexibility of a TValue would not be worth
the space overhead -- one can use an upvalue for those rare cases.]
Bye,
Mike