Comparison

util/import.lua @ 7188:e8f20be3e6f8

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 22 Feb 2016 18:46:59 +0100
parent 7183:b606a5b32e91
child 8389:5d866eb8f18f
comparison
equal deleted inserted replaced
7179:bfa3b2ee384c 7188:e8f20be3e6f8
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 9
10 10
11 local unpack = table.unpack or unpack; --luacheck: ignore 113
11 local t_insert = table.insert; 12 local t_insert = table.insert;
12 function import(module, ...) 13 function import(module, ...)
13 local m = package.loaded[module] or require(module); 14 local m = package.loaded[module] or require(module);
14 if type(m) == "table" and ... then 15 if type(m) == "table" and ... then
15 local ret = {}; 16 local ret = {};