awful.util.join: Stop using arg
Implementing vararg functions via arg is deprecated in lua. This kind of thing should instead be done via "...". Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
f38566bd97
commit
f9c2fcacb2
|
@ -237,9 +237,9 @@ end
|
||||||
-- @return A new table containing all keys from the arguments.
|
-- @return A new table containing all keys from the arguments.
|
||||||
function table.join(...)
|
function table.join(...)
|
||||||
local ret = {}
|
local ret = {}
|
||||||
for i = 1, arg.n do
|
for i, t in ipairs({...}) do
|
||||||
if arg[i] then
|
if t then
|
||||||
for k, v in pairs(arg[i]) do
|
for k, v in pairs(t) do
|
||||||
if type(k) == "number" then
|
if type(k) == "number" then
|
||||||
rtable.insert(ret, v)
|
rtable.insert(ret, v)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue