Software /
code /
prosody
Changeset
8521:6f5ce0f09f40
util.array: Add a __name field to metatable
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Feb 2018 08:23:15 +0100 |
parents | 8520:e959bc51de75 |
children | 8522:073e517a1487 |
files | util/array.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/array.lua Fri Feb 16 08:16:38 2018 +0100 +++ b/util/array.lua Fri Feb 16 08:23:15 2018 +0100 @@ -19,7 +19,7 @@ local array = {}; local array_base = {}; local array_methods = {}; -local array_mt = { __index = array_methods, __tostring = function (self) return "{"..self:concat(", ").."}"; end }; +local array_mt = { __index = array_methods, __name = "array", __tostring = function (self) return "{"..self:concat(", ").."}"; end }; local function new_array(self, t, _s, _var) if type(t) == "function" then -- Assume iterator