luci-0.9: merge r6410
This commit is contained in:
parent
c790400671
commit
5dea416e83
1 changed files with 6 additions and 6 deletions
|
@ -771,19 +771,19 @@ function copcall(f, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Handle return value of protected call
|
-- Handle return value of protected call
|
||||||
function handleReturnValue(err, co, status, arg1, arg2, arg3, arg4, arg5)
|
function handleReturnValue(err, co, status, ...)
|
||||||
if not status then
|
if not status then
|
||||||
return false, err(debug.traceback(co, arg1), arg1, arg2, arg3, arg4, arg5)
|
return false, err(debug.traceback(co, (...)), ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
if coroutine.status(co) ~= 'suspended' then
|
if coroutine.status(co) ~= 'suspended' then
|
||||||
return true, arg1, arg2, arg3, arg4, arg5
|
return true, ...
|
||||||
end
|
end
|
||||||
|
|
||||||
return performResume(err, co, coroutine.yield(arg1, arg2, arg3, arg4, arg5))
|
return performResume(err, co, coroutine.yield(...))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Resume execution of protected function call
|
-- Resume execution of protected function call
|
||||||
function performResume(err, co, arg1, arg2, arg3, arg4, arg5)
|
function performResume(err, co, ...)
|
||||||
return handleReturnValue(err, co, coroutine.resume(co, arg1, arg2, arg3, arg4, arg5))
|
return handleReturnValue(err, co, coroutine.resume(co, ...))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue