diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-16 19:20:27 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2019-07-16 19:20:27 +0000 |
commit | a22e99c79588d6b7d8620ed061925230427e1635 (patch) | |
tree | 417f5fd31edfea2a8ad0d3e407b767bcd1163b3c /lua/inet/init.lua | |
parent | 930296cfaadb49a8205231098502eaf20af2121a (diff) | |
download | lua-inet-a22e99c79588d6b7d8620ed061925230427e1635.tar.gz lua-inet-a22e99c79588d6b7d8620ed061925230427e1635.tar.xz lua-inet-a22e99c79588d6b7d8620ed061925230427e1635.zip |
add inet4:clone() for parity with inet6
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'lua/inet/init.lua')
-rw-r--r-- | lua/inet/init.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |