skynet.pcall support vararg; sharedata loader can use custom args

This commit is contained in:
David Feng
2016-04-27 20:53:05 +08:00
parent 4924c6d30b
commit 45d46b9072
3 changed files with 12 additions and 12 deletions

View File

@@ -611,14 +611,14 @@ local function ret(f, ...)
return ...
end
local function init_template(start)
local function init_template(start, ...)
init_all()
init_func = {}
return ret(init_all, start())
return ret(init_all, start(...))
end
function skynet.pcall(start)
return xpcall(init_template, debug.traceback, start)
function skynet.pcall(start, ...)
return xpcall(init_template, debug.traceback, start, ...)
end
function skynet.init_service(start)