[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Current Environment in 5.2
- From: Richard Hundt <richardhundt@...>
- Date: Mon, 18 Jan 2010 09:34:12 +0100
David Burgess wrote:
Can anyone tell me how in Lua 5.2 (not C) that one gets access to the
current environment table? i.e. the old 5.1 getfenv(1)
DB
debug.getfenv(debug.getinfo(1,"f").func)
In other words, unlike the old getfenv(), debug.getfenv wants a
reference to the function itself, not just a stack level (since it also
operates on userdata objects)