+luatexja.load_module('jfmglue'); local ltjj = luatexja.jfmglue
+luatexja.load_module('stack'); local ltjs = luatexja.stack
+luatexja.load_module('direction'); local ltjd = luatexja.direction
+
+local Dnode = node.direct or node
+
+local nullfunc = function(n) return n end
+local to_node = (Dnode ~= node) and Dnode.tonode or nullfunc
+local to_direct = (Dnode ~= node) and Dnode.todirect or nullfunc
+
+local setfield = (Dnode ~= node) and Dnode.setfield or function(n, i, c) n[i] = c end
+local getfield = (Dnode ~= node) and Dnode.getfield or function(n, i) return n[i] end
+local getlist = (Dnode ~= node) and Dnode.getlist or function(n) return n.head end
+local getid = (Dnode ~= node) and Dnode.getid or function(n) return n.id end
+local getfont = (Dnode ~= node) and Dnode.getfont or function(n) return n.font end
+local getsubtype = (Dnode ~= node) and Dnode.getsubtype or function(n) return n.subtype end
+
+local node_traverse_id = Dnode.traverse_id
+local node_new = Dnode.new
+local node_copy = Dnode.copy
+local node_hpack = Dnode.hpack
+local node_next = (Dnode ~= node) and Dnode.getnext or node.next
+local node_free = Dnode.free
+local node_prev = (Dnode ~= node) and Dnode.getprev or node.prev
+local node_tail = Dnode.tail
+local has_attr = Dnode.has_attribute
+local set_attr = Dnode.set_attribute
+local insert_after = Dnode.insert_after