Tuned dispatcher behaviour

This commit is contained in:
Steven Barth 2008-09-15 16:50:55 +00:00
parent 22c927621c
commit dc33ed7b57

View file

@ -353,16 +353,7 @@ function assign(path, clone, title, order)
obj.title = title obj.title = title
obj.order = order obj.order = order
local c = context.tree setmetatable(obj, {__index = _create_node(clone)})
for k, v in ipairs(clone) do
if not c.nodes[v] then
c.nodes[v] = {nodes={}}
end
c = c.nodes[v]
end
setmetatable(obj, {__index = c})
return obj return obj
end end
@ -388,7 +379,7 @@ end
-- @param ... Virtual path -- @param ... Virtual path
-- @return Dispatching tree node -- @return Dispatching tree node
function node(...) function node(...)
local c = _create_node(arg) local c = _create_node({...})
c.module = getfenv(2)._NAME c.module = getfenv(2)._NAME
c.path = arg c.path = arg