lua-users home
lua-l archive

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


Title: global variable conflict

Hello everybody,

i am new in Lua world, so i may ask some stupid question...

 I am facing a problem with variable names. I have a set of global variables defined in C and passed to the LUA stack via the C API. This stack is left intact and reused for running some LUA script. The problem is that, in the scripts, some variables could have the same name than variables retreived from C code. This yield the erasement of the initial variables. Is there any easy way to solve the problem, such as overloading the behaviour of the assignment operator "=" to test if the current variable name is already in use and warn the user of the conflict.

Any remark is obviously welcome!

Regards, cyril.