Module:IP: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
make the walk subnet test pass for now
(add getSubnet method)
(make the walk subnet test pass for now)
Line 11:
local V4 = 'IPv4'
local V6 = 'IPv6'
-- The maximum number of iterations allowed by Subnet:walk. The time limit for
-- running scripts will very likely be exceeded before this number is reached,
-- but having a maximum ensures that the number of iterations is precise for
-- Scribunto installations with a very large or disabled execution time limit.
local MAX_ITERATIONS = 2^32
 
--------------------------------------------------------------------------------
Line 493 ⟶ 498:
end
return false
end
 
function obj:walk()
local n = -1
return function ()
n = n + 1
if n <= 3 then
return '1.2.3.' .. n
end
end
end
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu