From 755ec706c4e4e4eb6315e2f2f9f2cfc0eed439aa Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 11 Jun 2011 16:45:00 +0200 Subject: beta 2011.06.11 16:45 --- tex/context/base/node-ser.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tex/context/base/node-ser.lua') diff --git a/tex/context/base/node-ser.lua b/tex/context/base/node-ser.lua index aa4615626..a460a0953 100644 --- a/tex/context/base/node-ser.lua +++ b/tex/context/base/node-ser.lua @@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['node-ser'] = { -- beware, some field names will change in a next releases -- of luatex; this is pretty old code that needs an overhaul -local type, format, concat, rep = type, string.format, table.concat, string.rep +local type, format, rep = type, string.format, string.rep +local concat, tohash, sortedkeys = table.concat, table.tohash, table.sortedkeys local allocate = utilities.storage.allocate @@ -23,7 +24,7 @@ local nodefields = nodes.fields local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist -local expand = allocate ( table.tohash { +local expand = allocate ( tohash { "list", -- list_ptr & ins_ptr & adjust_ptr "pre", -- "post", -- @@ -43,13 +44,13 @@ local expand = allocate ( table.tohash { -- page_insert: "height", "last_ins_ptr", "best_ins_ptr" -- split_insert: "height", "last_ins_ptr", "best_ins_ptr", "broken_ptr", "broken_ins" -local ignore = allocate ( table.tohash { +local ignore = allocate ( tohash { "page_insert", "split_insert", "ref_count", } ) -local dimension = allocate ( table.tohash { +local dimension = allocate ( tohash { "width", "height", "depth", "shift", "stretch", "shrink", "xoffset", "yoffset", @@ -178,7 +179,7 @@ local function serialize(root,name,handle,depth,m) if root.id then fld = nodefields(root) -- we can cache these (todo) else - fld = table.sortedkeys(root) + fld = sortedkeys(root) end if type(root) == 'table' and root['type'] then -- userdata or table handle(format("%s %s=%q,",depth,'type',root['type'])) -- cgit v1.2.3