add config

This commit is contained in:
云风
2012-08-30 16:42:14 +08:00
parent 51ef283887
commit f4a895fa6f
2 changed files with 10 additions and 0 deletions

9
lualib/config.lua Normal file
View File

@@ -0,0 +1,9 @@
local function config(path , pre)
assert(path)
local env = pre or {}
local f = assert(loadfile(path,"t",env))
f()
return env
end
return config