diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua b/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua index 7b5225dd353..eeed47594f8 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/cldf-stp.lua @@ -28,16 +28,16 @@ if not modules then modules = { } end modules ['cldf-stp'] = { -- ... -- end) -local create = coroutine.create -local yield = coroutine.yield -local resume = coroutine.resume -local status = coroutine.status +local create = coroutine.create +local yield = coroutine.yield +local resume = coroutine.resume +local status = coroutine.status -local stepper = nil -local stack = { } -- will never be deep so no gc needed -local depth = 0 +local stepper = nil +local stack = { } -- will never be deep so no gc needed +local depth = 0 -local nextstep = function() +local function nextstep() if status(stepper) == "dead" then stepper = stack[depth] depth = depth - 1 @@ -51,13 +51,13 @@ interfaces.implement { actions = nextstep, } -local cldresume = context.constructcsonly("clf_step") +local ctx_resume = context.protected.cs.clf_step function context.step(first,...) if first ~= nil then context(first,...) end - cldresume() + ctx_resume() yield() end @@ -65,5 +65,5 @@ function context.stepwise(f) depth = depth + 1 stack[depth] = stepper stepper = create(f) - resume(stepper) + ctx_resume(stepper) end |