Software /
code /
prosody
Diff
util/dataforms.lua @ 6777:5de6b93d0190
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:36:37 +0100 |
parent | 6672:d6a60e74f773 |
child | 6829:22522443982f |
line wrap: on
line diff
--- a/util/dataforms.lua Mon Aug 10 22:16:05 2015 +0200 +++ b/util/dataforms.lua Sat Feb 21 10:36:37 2015 +0100 @@ -13,14 +13,14 @@ local st = require "util.stanza"; local jid_prep = require "util.jid".prep; -module "dataforms" +local _ENV = nil; local xmlns_forms = 'jabber:x:data'; local form_t = {}; local form_mt = { __index = form_t }; -function new(layout) +local function new(layout) return setmetatable(layout, form_mt); end @@ -238,7 +238,9 @@ return field_tag:get_child_text("value"); end -return _M; +return { + new = new; +}; --[=[