Software /
code /
prosody
Comparison
util/stanza.lua @ 8520:e959bc51de75
util.stanza: Change __type to __name as this is used by Lua 5.3 in some error reporting functions
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Feb 2018 08:16:38 +0100 |
parent | 8382:e5d00bf4a4d5 |
child | 8555:4f0f5b49bb03 |
comparison
equal
deleted
inserted
replaced
8519:e7808f8d7d11 | 8520:e959bc51de75 |
---|---|
36 | 36 |
37 local xmlns_stanzas = "urn:ietf:params:xml:ns:xmpp-stanzas"; | 37 local xmlns_stanzas = "urn:ietf:params:xml:ns:xmpp-stanzas"; |
38 | 38 |
39 local _ENV = nil; | 39 local _ENV = nil; |
40 | 40 |
41 local stanza_mt = { __type = "stanza" }; | 41 local stanza_mt = { __name = "stanza" }; |
42 stanza_mt.__index = stanza_mt; | 42 stanza_mt.__index = stanza_mt; |
43 | 43 |
44 local function new_stanza(name, attr, namespaces) | 44 local function new_stanza(name, attr, namespaces) |
45 local stanza = { name = name, attr = attr or {}, namespaces = namespaces, tags = {} }; | 45 local stanza = { name = name, attr = attr or {}, namespaces = namespaces, tags = {} }; |
46 return setmetatable(stanza, stanza_mt); | 46 return setmetatable(stanza, stanza_mt); |