don't use coroutine to yield template code (fixes issue in lapis)

This commit is contained in:
leaf corcoran
2013-10-28 09:35:39 -07:00
parent 1344dee1e1
commit 92f0f7d78a
2 changed files with 17 additions and 6 deletions

View File

@@ -204,9 +204,17 @@ do
if name == nil then
name = "etlua"
end
local code_fn = coroutine.wrap(function()
return coroutine.yield(code)
end)
local code_fn
do
local code_ref = code
code_fn = function()
do
local ret = code_ref
code_ref = nil
return ret
end
end
end
local fn, err = load(code_fn, name)
if not (fn) then
do