From 6a37123f76303a89254925cf03a045e658351082 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 28 Mar 2016 19:56:12 +0200 Subject: net.dns: Import unpack() in forward-compatible way (Fixes compat with Lua5.2+) --- net/dns.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/dns.lua') diff --git a/net/dns.lua b/net/dns.lua index b047ec54..689020a4 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -22,8 +22,8 @@ local is_windows = (_ and windows) or os.getenv("WINDIR"); local coroutine, io, math, string, table = coroutine, io, math, string, table; -local ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type= - ipairs, next, pairs, print, setmetatable, tostring, assert, error, unpack, select, type; +local ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, unpack= + ipairs, next, pairs, print, setmetatable, tostring, assert, error, select, type, table.unpack or unpack; local ztact = { -- public domain 20080404 lua@ztact.com get = function(parent, ...) -- cgit v1.2.3