elua: list equality

This commit is contained in:
Daniel Kolesa 2014-04-14 09:37:19 +01:00 committed by Daniel Kolesa
parent c0a0fd318f
commit b052ef53e3
1 changed files with 3 additions and 0 deletions

View File

@ -177,6 +177,9 @@ local List_Base = util.Readonly_Object:clone {
selfmt.__free = freefunc
end
if list == nil then return end
selfmt.__eq = function(self, other)
return selfmt.__list == dgetmt(other).__list
end
selfmt.__list = list
end,