diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-04 03:01:28 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-04 03:01:28 +0000 |
commit | fc358ce7332053945afe16ced2a271556cdccfb7 (patch) | |
tree | d723e8bbffaaffd6c8c6d51d46c54db70c61f67a /macros/luatex/generic/lualibs/lualibs-util-sta.lua | |
parent | 34897eebd22c3de968b64f09bb4a371d96cb0b89 (diff) |
CTAN sync 202002040301
Diffstat (limited to 'macros/luatex/generic/lualibs/lualibs-util-sta.lua')
-rw-r--r-- | macros/luatex/generic/lualibs/lualibs-util-sta.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/macros/luatex/generic/lualibs/lualibs-util-sta.lua b/macros/luatex/generic/lualibs/lualibs-util-sta.lua index 7819395f69..9ca1c67e9a 100644 --- a/macros/luatex/generic/lualibs/lualibs-util-sta.lua +++ b/macros/luatex/generic/lualibs/lualibs-util-sta.lua @@ -81,6 +81,8 @@ end function stacker.new(name) + -- to be sped up, mmaybe foo:bar syntax here but then quite some access + local report = logs.reporter("stacker",name or nil) local s @@ -93,6 +95,7 @@ function stacker.new(name) local hashing = true local function push(...) + -- todo check if more than 1 argument for i=1,select("#",...) do insert(stack,(select(i,...))) -- watch the () end @@ -153,8 +156,12 @@ function stacker.new(name) local function resolve_step(ti) -- keep track of changes outside function ! -- todo: optimize for n=1 etc + if not top then + -- report("messed op stacker %a",name) + return + end local result = nil - local noftop = top and #top or 0 + local noftop = #top if ti > 0 then local current = list[ti] if current then |