big refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-21 11:51:11 +02:00
parent 2fe6ff2556
commit c08c990ff3
3 changed files with 210 additions and 203 deletions
+2 -4
View File
@@ -25,12 +25,10 @@ end
do
local modules = {}
local function module_env(name) aux_module(name) return getfenv() end
local function module_env(name) aux_module(name) return m end
function public.module(name)
local env = module_env(name)
if not modules[name] then
env.import(temp-{modules='', core='', util=''})
end
if not modules[name] then env.import(temp-{['']='modules', ['']='core', ['']='util'}) end
setfenv(2, env)
modules[name] = true
end