aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/GuiLua')
-rw-r--r--ClientHamr/GuiLua/skang.lua23
1 files changed, 0 insertions, 23 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index 9b14551..62ea957 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -312,26 +312,3 @@ end
312-- "_ENV is not supported directly in 5.1, so its use can prevent a module from remaining compatible with 5.1. 312-- "_ENV is not supported directly in 5.1, so its use can prevent a module from remaining compatible with 5.1.
313-- Maybe you can simulate _ENV with setfenv and trapping gets/sets to it via __index/__newindex metamethods, or just avoid _ENV." 313-- Maybe you can simulate _ENV with setfenv and trapping gets/sets to it via __index/__newindex metamethods, or just avoid _ENV."
314--[[ This is a Lua version of what module() does. Apparently the _LOADED stuff is needed somehow, even though it's a local? Think that was bogus. 314--[[ This is a Lua version of what module() does. Apparently the _LOADED stuff is needed somehow, even though it's a local? Think that was bogus.
315
316local _LOADED = package.loaded
317function _G.module (modname, ...)
318 local ns = _LOADED[modname]
319 if type(ns) ~= "table" then
320 ns = findtable (_G, modname)
321 if not ns then
322 error (string.format ("name conflict for module '%s'", modname))
323 end
324 _LOADED[modname] = ns
325 end
326 if not ns._NAME then
327 ns._NAME = modname
328 ns._M = ns
329 ns._PACKAGE = gsub (modname, "[^.]*$", "")
330 end
331 setfenv (2, ns)
332 for i, f in ipairs (arg) do
333 f (ns)
334 end
335end
336
337]]