Software /
code /
prosody
Diff
util/iterators.lua @ 7184:dedc6bf180e2
util.iterators: Localize unpack() in Lua 5.2 compatible way
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 22 Feb 2016 17:38:46 +0100 |
parent | 5776:bd0ff8ae98a8 |
child | 7186:9c3930bcbb72 |
line wrap: on
line diff
--- a/util/iterators.lua Mon Feb 22 17:37:55 2016 +0100 +++ b/util/iterators.lua Mon Feb 22 17:38:46 2016 +0100 @@ -11,7 +11,8 @@ local it = {}; local t_insert = table.insert; -local select, unpack, next = select, unpack, next; +local select, next = select, next; +local unpack = table.unpack or unpack; --luacheck: ignore 113 local function pack(...) return { n = select("#", ...), ... }; end -- Reverse an iterator