diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
commit | b55577d0998160c0174e250b542016ecd6ca9056 (patch) | |
tree | 27093212d5ca3e6ffe4ae434c3ec094233ed37ba /tex/context/base/node-met.lua | |
parent | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff) | |
download | context-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz |
2015-05-15 23:06:00
Diffstat (limited to 'tex/context/base/node-met.lua')
-rw-r--r-- | tex/context/base/node-met.lua | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/tex/context/base/node-met.lua b/tex/context/base/node-met.lua index c85a53c8e..335ce2a98 100644 --- a/tex/context/base/node-met.lua +++ b/tex/context/base/node-met.lua @@ -68,7 +68,7 @@ local nodes = nodes nodes.gonuts = gonuts -local nodecodes = nodes.codes +local nodecodes = nodes.nodecodes local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist @@ -332,6 +332,28 @@ function nodes.writable_spec(n) -- not pool return spec end +function nodes.copy_spec(old,free) -- also frees + if not old then + return n_new_node("glue_spec") + else + local new = n_copy_node(old) + if free and old.writable then + free_node(old) + end + return new + end +end + +function nodes.free_spec(old) + if not old then + -- skip + elseif old.writable then + free_node(old) + else + -- skip + end +end + if gonuts then function nodes.reference(n) @@ -668,3 +690,34 @@ end nodes.keys = keys -- [id][subtype] nodes.fields = nodefields -- (n) + +-- one issue solved in flush_node: +-- +-- case glue_spec_node: +-- if (glue_ref_count(p)!=null) { +-- decr(glue_ref_count(p)); +-- return ; +-- /* +-- } else if (! valid_node(p)) { +-- return ; +-- */ +-- /* +-- } else { +-- free_node(p, get_node_size(type(p), subtype(p))); +-- return ; +-- */ +-- } +-- break ; +-- +-- or: +-- +-- case glue_spec_node: +-- if (glue_ref_count(p)!=null) { +-- decr(glue_ref_count(p)); +-- return ; +-- } else if (valid_node(p)) { +-- free_node(p, get_node_size(type(p), subtype(p))); +-- return ; +-- } else { +-- break ; +-- } |