# HG changeset patch # User Kim Alvefur # Date 1539298338 -7200 # Node ID 09b873ac7eb8d81bcbdb317be94ecbfed0df734d # Parent a96a2fbcc6c06d3baa5c2f7ac032142cd9ad1d1b util.stanza: Set preserialize as freeze metamethod diff -r a96a2fbcc6c0 -r 09b873ac7eb8 util/stanza.lua --- a/util/stanza.lua Fri Oct 12 00:51:56 2018 +0200 +++ b/util/stanza.lua Fri Oct 12 00:52:18 2018 +0200 @@ -359,6 +359,8 @@ return s; end +stanza_mt.__freeze = preserialize; + local function deserialize(stanza) -- Set metatable if stanza then