aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/moduleapi.lua4
-rw-r--r--core/modulemanager.lua2
2 files changed, 4 insertions, 2 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index e5f86b37..c30a8936 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -370,7 +370,9 @@ function api:open_store(name, type)
return require"core.storagemanager".open(self.host, name or self.name, type);
end
-return function (mm)
+function api.init(mm)
modulemanager = mm;
return api;
end
+
+return api;
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 198e208a..92372ac3 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -37,7 +37,7 @@ local _G = _G;
module "modulemanager"
-local api = _G.require "core.moduleapi"(_M); -- Module API container
+local api = _G.require "core.moduleapi".init(_M); -- Module API container
-- [host] = { [module] = module_env }
local modulemap = { ["*"] = {} };