Skip to content

Commit

Permalink
Merge pull request #58 from yongkangchen/patch-6
Browse files Browse the repository at this point in the history
fix #57
  • Loading branch information
pangweiwei committed Jul 27, 2015
2 parents 8a3efd1 + 22be22d commit 33894bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Slua/Script/LuaState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,14 @@ static int init(IntPtr L)
if not ret[1] then UnityEngine.Debug.LogError(debug.traceback(co,ret[2])) end
return unpack(ret)
end
coroutine.wrap = function(func)
local co = coroutine.create(func)
return function(...)
local ret={coroutine.resume(co,...)}
return unpack(ret, 2)
end
end
";

// overload resume function for report error
Expand Down

0 comments on commit 33894bd

Please sign in to comment.