Add some comments

This commit is contained in:
Eryn Lynn 2019-09-28 00:19:29 -04:00
parent 17fac4d008
commit d61ce8ed97

View file

@ -15,12 +15,20 @@ local function pack(...)
return len, { ... }
end
--[[
Returns first value (success), and packs all following values.
]]
local function packResult(...)
local result = (...)
return result, pack(select(2, ...))
end
--[[
Calls a non-yielding function in a new coroutine.
Handles errors if they happen.
]]
local function ppcall(callback, ...)
local co = coroutine.create(callback)