libs/nixio: add destination table argument to nixio.util.consume()
This commit is contained in:
parent
5f000ef19e
commit
4bc6b85bb7
1 changed files with 3 additions and 3 deletions
|
@ -26,8 +26,8 @@ local file = nixio.meta_file
|
|||
local uname = nixio.uname()
|
||||
local ZBUG = uname.sysname == "Linux" and uname.release:sub(1, 3) == "2.4"
|
||||
|
||||
function consume(iter)
|
||||
local tbl = {}
|
||||
function consume(iter, append)
|
||||
local tbl = append or {}
|
||||
for obj in iter do
|
||||
tbl[#tbl+1] = obj
|
||||
end
|
||||
|
@ -259,4 +259,4 @@ for k, v in pairs(meta) do
|
|||
file[k] = v
|
||||
socket[k] = v
|
||||
tls_socket[k] = v
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue