diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-08-11 01:23:08 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-08-11 01:23:08 +0200 |
commit | 1ef7a093aaf03b6327b3da94d47f53760c868c60 (patch) | |
tree | 228e6d4a5005598aaea191b3317c2fa21e22de75 /tex/context/base/mkiv/lpdf-pde.lua | |
parent | b61d5dd3555e906b21601ff75b3268c0f359283e (diff) | |
download | context-1ef7a093aaf03b6327b3da94d47f53760c868c60.tar.gz |
2018-08-10 16:58:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-pde.lua')
-rw-r--r-- | tex/context/base/mkiv/lpdf-pde.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/lpdf-pde.lua b/tex/context/base/mkiv/lpdf-pde.lua index 790e8e7ff..cecb1447f 100644 --- a/tex/context/base/mkiv/lpdf-pde.lua +++ b/tex/context/base/mkiv/lpdf-pde.lua @@ -41,7 +41,7 @@ local setmetatable, rawset, rawget, type, next = setmetatable, rawset, rawget, t local tostring, tonumber, unpack = tostring, tonumber, unpack local char, byte, find = string.char, string.byte, string.find local abs = math.abs -local concat, swapped = table.concat, table.swapped +local concat, swapped, sortedhash, sortedkeys = table.concat, table.swapped, table.sortedhash, table.sortedkeys local utfchar = string.char local setmetatableindex = table.setmetatableindex @@ -874,10 +874,15 @@ if img then do local plugins = nil + -- Sorting the hash slows down upto 5% bit but it is still as fast as the C + -- code. We could loop over the index instead but sorting might be nicer in + -- the end. + copydictionary = function (xref,copied,object) local target = pdfdictionary() local source = object.__raw__ - for key, value in next, source do + -- for key, value in next, source do + for key, value in sortedhash(source) do if plugins then local p = plugins[key] if p then |