# HG changeset patch # User Matthew Wild # Date 1335045202 -3600 # Node ID 9d24bc503621a2d09038a164497a5457c0f2cb2e # Parent d1739d72100af1c0411707af063d44e6405149ec 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]) diff -r d1739d72100a -r 9d24bc503621 core/modulemanager.lua --- a/core/modulemanager.lua Sat Apr 21 22:52:15 2012 +0100 +++ b/core/modulemanager.lua Sat Apr 21 22:53:22 2012 +0100 @@ -144,6 +144,7 @@ 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