Comparison

core/moduleapi.lua @ 6415:010b141e91ed

core.modulemanager, core.moduleapi: Hack around dependency loop
author Kim Alvefur <zash@zash.se>
date Wed, 17 Sep 2014 14:48:49 +0200
parent 6414:31c15004bfb0
child 6418:ae798314347c
child 6422:6d4d87a89026
comparison
equal deleted inserted replaced
6414:31c15004bfb0 6415:010b141e91ed
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 local config = require "core.configmanager"; 9 local config = require "core.configmanager";
10 local modulemanager = require "modulemanager"; -- This is necessary to avoid require loops 10 local modulemanager; -- This gets set from modulemanager
11 local array = require "util.array"; 11 local array = require "util.array";
12 local set = require "util.set"; 12 local set = require "util.set";
13 local logger = require "util.logger"; 13 local logger = require "util.logger";
14 local pluginloader = require "util.pluginloader"; 14 local pluginloader = require "util.pluginloader";
15 local timer = require "util.timer"; 15 local timer = require "util.timer";
368 368
369 function api:open_store(name, type) 369 function api:open_store(name, type)
370 return require"core.storagemanager".open(self.host, name or self.name, type); 370 return require"core.storagemanager".open(self.host, name or self.name, type);
371 end 371 end
372 372
373 return api; 373 return function (mm)
374 modulemanager = mm;
375 return api;
376 end