lua-users home
lua-l archive

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




On 13/03/15 09:18 AM, Luiz Henrique de Figueiredo wrote:
I wish Lua had "env stacks"[1]
It does: use "local _ENV=" instead of setenv:

    local _ENV={print=print}
    print "normal stuff"
    do
    	local _ENV= {print=function()
    		print "not normal"
    	end}
    	print()
    end
    print "normal stuff, again"


_ENV doesn't use a special value in the VM, thus it's a one-way thing. How do I get the _ENV from obfuscated bytecode?

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.