[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to replace getfenv/setfenv in Lua 5.3?
- From: Paul K <paul@...>
- Date: Fri, 27 Mar 2015 18:56:46 +0000
Hi Tim,
>How do I re-write this line from the example using Lua 5.3?
> return getfenv(func)[name]
I'm using this in MobDebug debugger and it works well in Lua 5.3 as
well (or at least I haven't seen any issues yet):
https://github.com/pkulchenko/MobDebug/blob/master/src/mobdebug.lua#L65-L81
Paul.
On Fri, Mar 27, 2015 at 11:51 AM, Tim Hunter <timhunter100@gmail.com> wrote:
> I know this topic has been discussed many times on this list but after much
> searching I'm not able to find anything that exactly addresses my question.
>
> I'm upgrading an application from Lua 5.1 to Lua 5.3. Part of the
> application includes a simple line-mode Lua debugger. This debugger can move
> up and down the stack and get and set variables in the desired function
> using code that is very similar to Listing 23.1 (page 209) in PiL 2nd. ed.
>
> How do I re-write this line from the example using Lua 5.3?
>
> return getfenv(func)[name]
>
>