mirror of
https://github.com/nmap/nmap.git
synced 2026-09-16 01:08:18 +00:00
Add __len metamethod for output_table
This commit is contained in:
parent
a69a7fb676
commit
25a2a184c4
1 changed files with 3 additions and 0 deletions
|
|
@ -1155,6 +1155,9 @@ function output_table ()
|
|||
end,
|
||||
__call = function (_) -- hack to mean "not_empty?"
|
||||
return not not next(order)
|
||||
end,
|
||||
__len = function (_)
|
||||
return #order
|
||||
end
|
||||
}
|
||||
return setmetatable({}, mt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue