[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setmetatable vs debug.setmetatable?
- From: Thomas Lauer <thomas.lauer@...>
- Date: Fri, 03 Aug 2007 14:38:33 +0100
"Duncan Cross" <duncan.cross@gmail.com> wrote:
> True, I forgot about that. Is there any chance you could register a C
> function that uses the API to give you a "dummy" full userdata (one
> byte long or something) instead of a table, and set the metatable on
> that instead?
The (undocumented) function newproxy() might be the ticket. Search the
list archives.
> On 8/3/07, PA <petite.abeille@gmail.com> wrote:
> >
> > On Aug 03, 2007, at 14:24, Duncan Cross wrote:
> >
> > > Wrap the function as the __call metamethod in a table?
> >
> > Cunning... :P
> >
> > But then... one cannot (re)define the __len metamethod :(
--
cheers thomasl
web : http://thomaslauer.com/start