aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-08 01:52:16 +1000
committerDavid Walter Seikel2014-04-08 01:52:16 +1000
commitbe71eb02a95ed48d593302ddd6e6595e9967163a (patch)
tree301e353f6921514bf6417eee5e572b5381e8be7a /ClientHamr/GuiLua
parentActually build GuiLua. (diff)
downloadSledjHamr-be71eb02a95ed48d593302ddd6e6595e9967163a.zip
SledjHamr-be71eb02a95ed48d593302ddd6e6595e9967163a.tar.gz
SledjHamr-be71eb02a95ed48d593302ddd6e6595e9967163a.tar.bz2
SledjHamr-be71eb02a95ed48d593302ddd6e6595e9967163a.tar.xz
Fix up getfenv() call for GuiLua, though it doesn't really make sense.
Diffstat (limited to 'ClientHamr/GuiLua')
-rw-r--r--ClientHamr/GuiLua/skang.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index 9689936..4f221a0 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -1,7 +1,7 @@
1--[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua. 1--[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua.
2C will let us - 2C will let us -
3 Use Ecore's main loop.
4 Actually do the widget stuff. 3 Actually do the widget stuff.
4 Use Ecore's main loop.
5 Slap meta tables on all value types. 5 Slap meta tables on all value types.
6 Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner. 6 Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner.
7 Figure out the directory separator. 7 Figure out the directory separator.
@@ -95,7 +95,13 @@ moduleBegin = function (name, author, copyright, version, timestamp, skin, isLua
95 -- Should do this before any further require(), so that circular references don't blow out. 95 -- Should do this before any further require(), so that circular references don't blow out.
96 96
97 -- Save the callers environment. 97 -- Save the callers environment.
98 local savedEnvironment = getfenv(level) 98 local savedEnvironment
99 if isLua then
100 savedEnvironment = getfenv(level)
101 else
102 -- While the above works fine for test_c, it doesn't for GuiLua. Odd.
103 savedEnvironment = getfenv(1)
104 end
99 105
100 -- Clone the environment into _M, so the module can access everything as usual after the setfenv() below. 106 -- Clone the environment into _M, so the module can access everything as usual after the setfenv() below.
101 --[[ TODO - Check if this also clones _G or _ENV. And see if it leaks stuff in either direction. 107 --[[ TODO - Check if this also clones _G or _ENV. And see if it leaks stuff in either direction.