diff options
Diffstat (limited to 'tex/context/base/mkiv/util-tab.lua')
-rw-r--r-- | tex/context/base/mkiv/util-tab.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/util-tab.lua b/tex/context/base/mkiv/util-tab.lua index b51c6589a..be5f1318c 100644 --- a/tex/context/base/mkiv/util-tab.lua +++ b/tex/context/base/mkiv/util-tab.lua @@ -335,7 +335,6 @@ function table.fastserialize(t,prefix) local r = { type(prefix) == "string" and prefix or "return" } local m = 1 - local function fastserialize(t,outer) -- no mixes local n = #t m = m + 1 @@ -655,19 +654,20 @@ local function serialize(root,name,specification) -- we could check for k (index) being number (cardinal) if root and next(root) ~= nil then local first = nil - local last = 0 - last = #root - for k=1,last do - if rawget(root,k) == nil then - -- if root[k] == nil then - last = k - 1 - break - end - end + local last = #root if last > 0 then - first = 1 + for k=1,last do + if rawget(root,k) == nil then + -- if root[k] == nil then + last = k - 1 + break + end + end + if last > 0 then + first = 1 + end end - local sk = sortedkeys(root) -- inline fast version?\ + local sk = sortedkeys(root) for i=1,#sk do local k = sk[i] local v = root[k] |