Diff

util/array.lua @ 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
parent 8017:ec7cab8e744d
child 9487:4e38121a349d
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