[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: checking types without tags
- From: Ignacio Castaño <castanyo@...>
- Date: Thu, 23 May 2002 18:23:24 +0200
sorry, but I understand everything but this:
Peter Shook wrote:
> Then lua_getmetatable pushes the metatable for im on top of the stack.
> Then we make sure that our userdata is the right type by comparing the
> metatable of im with upvalueindex(1). You never now, some user might
> have entered im.ColorAllocate(some_other_userdata,0,0,0).
> If our userdata is the right type, then return a pointer to our
Why is the metatable at upvalueindex(1)?
In: "im:ColorAllocate(255, 255, 255)" the 'gettable' event is called and it
calls 'ColorAllocate' in the 'gettable' table. But in wich moment appears
the metatable in upvalueindex(1)? Is that something that the gettable does
I think the problem is that I don't understand how upvalues work in the new
work version. I would be very gratefull, if someone could explain that. :-)
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com