This commit is contained in:
Eryn Lynn 2019-09-28 01:06:29 -04:00
parent e86c068ce2
commit 1ca7dfbc3e

View file

@ -35,7 +35,10 @@ end
Handles errors if they happen.
]]
local function ppcall(yieldError, callback, ...)
local co = coroutine.create(callback)
-- Wrapped because C functions can't be passed to coroutine.create!
local co = coroutine.create(function(...)
return callback(...)
end)
local ok, len, result = packResult(coroutine.resume(co, ...))