aboutsummaryrefslogtreecommitdiffstats
path: root/util/template.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-28 15:06:56 +0100
committerKim Alvefur <zash@zash.se>2016-02-28 15:06:56 +0100
commita2e7422c44fa376517b143a317b60042b85a8dc9 (patch)
treef4be8fd8748b09429e518c34024b79b273d76845 /util/template.lua
parenta50400a3c22434805b4220379070b09930639063 (diff)
parent29cb6ece54e331e6bed5a042524091f75b43846a (diff)
downloadprosody-a2e7422c44fa376517b143a317b60042b85a8dc9.tar.gz
prosody-a2e7422c44fa376517b143a317b60042b85a8dc9.zip
Merge 0.10->trunk
Diffstat (limited to 'util/template.lua')
-rw-r--r--util/template.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/template.lua b/util/template.lua
index a26dd7ca..04ebb93d 100644
--- a/util/template.lua
+++ b/util/template.lua
@@ -1,4 +1,4 @@
-
+-- luacheck: ignore 213/i
local stanza_mt = require "util.stanza".stanza_mt;
local setmetatable = setmetatable;
local pairs = pairs;
@@ -67,12 +67,12 @@ end
local function create_cloner(stanza, chunkname)
local lookup = {};
local name = create_clone_string(stanza, lookup, "");
- local f = "local setmetatable,stanza_mt=...;return function(data)";
+ local src = "local setmetatable,stanza_mt=...;return function(data)";
for i=1,#lookup do
- f = f.."local _"..i.."="..lookup[i]..";";
+ src = src.."local _"..i.."="..lookup[i]..";";
end
- f = f.."return "..name..";end";
- local f,err = loadstring(f, chunkname);
+ src = src.."return "..name..";end";
+ local f,err = loadstring(src, chunkname);
if not f then error(err); end
return f(setmetatable, stanza_mt);
end