modulemanager: For children of shared modules, set module.environment to the empty environment for that module (useful to expose data or APIs at host.modules[module])

remotes/origin/0.11
Matthew Wild 14 years ago
parent 2d05356905
commit 6202ef36ec
  1. 1
      core/modulemanager.lua

@ -144,6 +144,7 @@ local function do_load_module(host, module_name)
local ok, result, module_err = call_module_method(mod, "add_host", host_module_api);
if not ok or result == false then return nil, ok and module_err or result; end
local host_module = setmetatable({ module = host_module_api }, { __index = mod });
host_module.module.environment = host_module;
modulemap[host][module_name] = host_module;
return host_module;
end

Loading…
Cancel
Save