aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-20 14:35:48 +1000
committerDavid Walter Seikel2014-03-20 14:35:48 +1000
commit25832dae9df8849e0ed79f6e602b1bdf86475d31 (patch)
tree1469531a68e6f3229074f65cff9d4e5d0504c8ae /ClientHamr
parentCopy old base Skanglets into skang.lua for reference. (diff)
downloadSledjHamr-25832dae9df8849e0ed79f6e602b1bdf86475d31.zip
SledjHamr-25832dae9df8849e0ed79f6e602b1bdf86475d31.tar.gz
SledjHamr-25832dae9df8849e0ed79f6e602b1bdf86475d31.tar.bz2
SledjHamr-25832dae9df8849e0ed79f6e602b1bdf86475d31.tar.xz
Remove the module() code again.
Diffstat (limited to 'ClientHamr')
-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]]