lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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