Add posibility to pass args to called-functions in dispatcher

This commit is contained in:
Steven Barth 2008-10-26 18:55:54 +00:00
parent 253a61ad80
commit 511b573c95

View file

@ -469,7 +469,13 @@ end
-- @param ... Additional parameters passed to the function
function call(name, ...)
local argv = {...}
return function() return getfenv()[name](unpack(argv)) end
return function(...)
if #argv > 0 then
return getfenv()[name](unpack(argv), ...)
else
return getfenv()[name](...)
end
end
end
--- Create a template render dispatching target.