mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 05:37:39 +03:00
core.modulemanager, core.moduleapi: Hack around dependency loop
This commit is contained in:
parent
a36064641e
commit
93a297bc8f
2 changed files with 6 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
|||
--
|
||||
|
||||
local config = require "core.configmanager";
|
||||
local modulemanager = require "modulemanager"; -- This is necessary to avoid require loops
|
||||
local modulemanager; -- This gets set from modulemanager
|
||||
local array = require "util.array";
|
||||
local set = require "util.set";
|
||||
local logger = require "util.logger";
|
||||
|
@ -370,4 +370,7 @@ function api:open_store(name, type)
|
|||
return require"core.storagemanager".open(self.host, name or self.name, type);
|
||||
end
|
||||
|
||||
return api;
|
||||
return function (mm)
|
||||
modulemanager = mm;
|
||||
return api;
|
||||
end
|
||||
|
|
|
@ -37,7 +37,7 @@ local _G = _G;
|
|||
|
||||
module "modulemanager"
|
||||
|
||||
local api = _G.require "core.moduleapi"; -- Module API container
|
||||
local api = _G.require "core.moduleapi"(_M); -- Module API container
|
||||
|
||||
-- [host] = { [module] = module_env }
|
||||
local modulemap = { ["*"] = {} };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue