[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newproxy() tricks
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Mon, 13 Dec 2010 11:47:33 +0100
2010/12/13 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> I think in 5.2 will become useless for all __gc hacks since __gc must be set
>> before the metatable is set.
>
> The metatable must have a __gc field when the metatable is set,
> but you may set __gc as true for instance and change it later.
Is newproxy doing that ?
Even if it does not it is useful to be able to create objects from Lua
on which all metamethods (including __len) can be implemented.