lua-users home
lua-l archive

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


>> I don't want my C vars to be local but I want to be able to assign
>> values to them the usual way and not interfere with gloabal lua vars.

So, perhaps the easiest way is to create a proxy table called C which
handles only reads and writes to C vars. You can then set "gettable/settable"
tag methods for C (in Lua 4.0) or "__index/__newindex" metamethods (in Lua 5.0).
Note that you won't store anything in C; just use it to access C vars.
--lhf