From eaa823a5971bfd2e9cb38dd8f30fefee2da95c2e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 21 Feb 2015 10:36:37 +0100 Subject: util.*: Remove use of module() function, make all module functions local and return them in a table at the end --- util/caps.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'util/caps.lua') diff --git a/util/caps.lua b/util/caps.lua index 4723b912..cd5ff9c0 100644 --- a/util/caps.lua +++ b/util/caps.lua @@ -12,9 +12,9 @@ local sha1 = require "util.hashes".sha1; local t_insert, t_sort, t_concat = table.insert, table.sort, table.concat; local ipairs = ipairs; -module "caps" +local _ENV = nil; -function calculate_hash(disco_info) +local function calculate_hash(disco_info) local identities, features, extensions = {}, {}, {}; for _, tag in ipairs(disco_info) do if tag.name == "identity" then @@ -58,4 +58,6 @@ function calculate_hash(disco_info) return ver, S; end -return _M; +return { + calculate_hash = calculate_hash; +}; -- cgit v1.2.3