lua-users home
lua-l archive

Re: Multiple functions: was the gc

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


Attached is another approach. Give it a spin and then try to unravel what's happening! :-)
Unfortunately, that doesn't solve your "bar problem" either... (The tlg function again replaces just one environment.)
Unless you do something like:
-- load script
local script = loadfile "somescript.lua"
-- reroute to thread local globals
tlg(script)
-- execute
script()
This reroutes all function definitions in the script to use thread local globals in one go.
--
Wim

AltStyle によって変換されたページ (->オリジナル) /