xact dual syntax.

This commit is contained in:
p.kosyh 2010-07-02 12:11:21 +00:00
parent 98d8647d35
commit 22a76589fd

View file

@ -4,6 +4,12 @@ end
xact = function(n, f) -- just simple action!
local v = {};
if f == nil and type(n) == 'table' then
f = n[2];
n = n[1];
end
if type(n) ~= 'string' or (type(f) ~= 'string' and not isCode(f)) then
error ("Wrong parameter to xact.", 2)
end