mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +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:
parent
e7b40571ef
commit
1943c0a2fc
1 changed files with 1 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue