Software /
code /
prosody
Changeset
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 |
parents | 7183:b606a5b32e91 |
children | 7185:5687788a2e4d |
files | util/iterators.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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