summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/util-tab.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-02-24 17:41:43 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-02-24 17:41:43 +0100
commitb55beadd32489008a75cf46c9eeb22aa20764cc7 (patch)
treef218b3c60a56af20a76dc01e09c8f95a0bf5ec68 /tex/context/base/mkiv/util-tab.lua
parent7b271baae19db1528fbe6621bdf50af89a5a336b (diff)
downloadcontext-b55beadd32489008a75cf46c9eeb22aa20764cc7.tar.gz
2019-02-24 17:31:00
Diffstat (limited to 'tex/context/base/mkiv/util-tab.lua')
-rw-r--r--tex/context/base/mkiv/util-tab.lua24
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]