summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/cldf-stp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/cldf-stp.lua')
-rw-r--r--tex/context/base/mkiv/cldf-stp.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/tex/context/base/mkiv/cldf-stp.lua b/tex/context/base/mkiv/cldf-stp.lua
index 7b5225dd3..eeed47594 100644
--- a/tex/context/base/mkiv/cldf-stp.lua
+++ b/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