diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-18 21:55:14 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-07-18 21:55:14 +0000 |
commit | 4bc6b85bb7d1932c5d3df84b7fefeaecbffd213c (patch) | |
tree | bae073a933cdc4fd048081f58fe2b573a8018836 /libs/nixio/lua | |
parent | 5f000ef19e7e06a5e31b1afd87d7d5654be36fc9 (diff) |
libs/nixio: add destination table argument to nixio.util.consume()
Diffstat (limited to 'libs/nixio/lua')
-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 0e8c90c9a..d83209aff 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 |