[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Locals in Lua Environments
- From: Tim Hunter <TimHunter@...>
- Date: Mon, 28 May 2007 18:21:57 -0400
Luís Santos wrote:
I'm using the debug library to do this. debug.getlocal(2,2) gets me the
2nd argument to the caller, for example.
Under the risk of sounding stupid, just a curiosity: is there any reason I
should not be able to access the function arguments when I access the function
environment via getfenv() ?
My guess would be that this is some colateral effect of the paremeters being local.
I have no doubt that the argument variables should be local - so they won't
collide with global environment. But when I am accessing my caller's environment
from another function, the lack of access to his arguments looks kinda strange