Add __len metamethod for output_table

This commit is contained in:
dmiller 2013-10-18 18:35:03 +00:00
parent a69a7fb676
commit 25a2a184c4

View file

@ -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)