Software /
code /
prosody
Diff
core/moduleapi.lua @ 6418:ae798314347c
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Sep 2014 02:22:48 +0200 |
parent | 6168:3942630b4e35 |
parent | 6415:010b141e91ed |
child | 6423:1c78f10f05d0 |
line wrap: on
line diff
--- a/core/moduleapi.lua Tue Sep 16 13:02:21 2014 -0400 +++ b/core/moduleapi.lua Thu Sep 18 02:22:48 2014 +0200 @@ -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"; @@ -19,6 +19,7 @@ local error, setmetatable, type = error, setmetatable, type; local ipairs, pairs, select = ipairs, pairs, select; local tonumber, tostring = tonumber, tostring; +local require = require; local pack = table.pack or function(...) return {n=select("#",...), ...}; end -- table.pack is only in 5.2 local unpack = table.unpack or unpack; -- renamed in 5.2 @@ -386,7 +387,10 @@ end function api:open_store(name, type) - return storagemanager.open(self.host, name or self.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