diff options
-rw-r--r-- | libs/nixio/lua/nixio/util.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/nixio/lua/nixio/util.lua b/libs/nixio/lua/nixio/util.lua index 0e8c90c9a5..d83209aff6 100644 --- a/libs/nixio/lua/nixio/util.lua +++ b/libs/nixio/lua/nixio/util.lua @@ -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
\ No newline at end of file +end |