Module:LuaCall: Difference between revisions
From Test Wiki
Content deleted Content added
convert "invoke" to do a true #invoke off the parent frame instead of mangling the frame args and attempting to emulate a #invoke as the emulation is error prone and can easily be detected |
m Quick simplification - use "elseif" instead of "else if" (in addition, improve formatting slightly) |
||
| Line 33: | Line 33: | ||
if type(reserved_call)~="function" then |
if type(reserved_call)~="function" then |
||
return tostring(reserved_call) |
return tostring(reserved_call) |
||
| ⚫ | |||
reserved_output={reserved_call(unpack(reserved_value))} |
|||
return reserved_output[reserved_return or 1] |
return reserved_output[reserved_return or 1] |
||
end |
end |
||
| Line 152: | Line 153: | ||
pfargs[2], usedpargs[2] = pframe.args[2], true |
pfargs[2], usedpargs[2] = pframe.args[2], true |
||
end |
end |
||
elseif not pfargs[2] then |
|||
| ⚫ | |||
pfargs[2], usedpargs[1] = pframe.args[1], true |
|||
pfargs[2], usedpargs[1] = pframe.args[1], true |
|||
end |
|||
end |
end |
||
-- repack sequential args |
-- repack sequential args |
||