From a22e99c79588d6b7d8620ed061925230427e1635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Tue, 16 Jul 2019 19:20:27 +0000 Subject: add inet4:clone() for parity with inet6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- lua/inet/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/inet/init.lua b/lua/inet/init.lua index b91f845..ef8c5f2 100644 --- a/lua/inet/init.lua +++ b/lua/inet/init.lua @@ -321,6 +321,10 @@ function inet4:__pow(n) return new_inet4(self.bip, self.mask + n) end +function inet4:clone() + return new_inet4(self.bip, self.mask) +end + function inet4:contains(other) if self.mask >= other.mask then return false -- cgit v1.2.1