mirror of
https://github.com/nmap/nmap.git
synced 2026-01-08 07:29:03 +00:00
Simplify output_table __index metamethod
From Lua 5.3 docs: "Despite the name, the metamethod for this event can be either a function or a table. [...] If it is a table, the final result is the result of indexing this table with key."
This commit is contained in:
@@ -959,9 +959,7 @@ function output_table ()
|
||||
end
|
||||
rawset(t, k, v)
|
||||
end,
|
||||
__index = function (_, k)
|
||||
return t[k]
|
||||
end,
|
||||
__index = t,
|
||||
__pairs = function (_)
|
||||
return coroutine.wrap(iterator)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user