Software /
code /
prosody
Comparison
net/dns.lua @ 7322:addf60d25356
net.dns: Import unpack() in forward-compatible way (Fixes compat with Lua5.2+)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 28 Mar 2016 19:56:12 +0200 |
parent | 7098:5286e79c6829 |
child | 7469:363e4a5e9b0a |
comparison
equal
deleted
inserted
replaced
7321:a7199fc8a50e | 7322:addf60d25356 |
---|---|
20 local is_windows = (_ and windows) or os.getenv("WINDIR"); | 20 local is_windows = (_ and windows) or os.getenv("WINDIR"); |
21 | 21 |
22 local coroutine, io, math, string, table = | 22 local coroutine, io, math, string, table = |
23 coroutine, io, math, string, table; | 23 coroutine, io, math, string, table; |
24 | 24 |
25 local ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type= | 25 local ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, unpack= |
26 ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type; | 26 ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, table.unpack or unpack; |
27 | 27 |
28 local ztact = { -- public domain 20080404 lua@ztact.com | 28 local ztact = { -- public domain 20080404 lua@ztact.com |
29 get = function(parent, ...) | 29 get = function(parent, ...) |
30 local len = select('#', ...); | 30 local len = select('#', ...); |
31 for i=1,len do | 31 for i=1,len do |