[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: userdata event tables?
- From: Diego Nehab <diego@<a href="/cgi-bin/echo.cgi?tecgraf.puc-rio.br">...</a>>
- Date: Fri, 1 Feb 2002 19:34:22 -0200 (EDT)
> Related to my earlier discussion of refs, I'm trying to set up a
> userdata to a table - that is, I want it's "index" tag handler to
> refer to a real lua table. In lua.c I added this code to create a
> userdata object and a table as globals.
I don't know if it is a feature or not, but I had the same "problem". In
fact, one can argue that the index method makes no sense for userdata
objects, since the vm has no way of telling wether the entry for the key is
nil or not :-). Try setting gettable instead.
Also, it seams to me that userdata manipulation is now restricted to the C
side, to avoid improper use by client Lua applications fiddling with your C