[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question regarding lua 5.1 and locals' name
- From: Rici Lake <lua@...>
- Date: Fri, 27 Oct 2006 23:11:47 -0500
On 27-Oct-06, at 10:04 PM, Jean-Francois Goulet wrote:
Does anyone knows why lua returns the name of some locals
as "(*temporary)"? I've looked at the source code, and in the ldebug.c
file, in the static const char *findlocal (lua_State *L, CallInfo *ci,
int n) function, it return such a name in certain conditions. Does
anyone has an idea why? Is there a way to recuperate the actual
"scripted" name associated with such a local?
Such values are not actually local variables, so there was no scripted
name.
For example, to evaluate:
local e = (a + b) * (c + d)
Lua (like any other language) has to effectively do:
local e do
local t1 = a + b
local t2 = c + d
e = t1 + t2
end
t1 and t2 are reported as (temporary), which they indeed are.