Comparison

util/sslconfig.lua @ 6671:2d5e2ed44c22

util.sslconfig: Rename variable to avoid name clash [luacheck]
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:43:28 +0100
parent 6292:751618071e89
child 6777:5de6b93d0190
comparison
equal deleted inserted replaced
6670:5e72f7aadbcc 6671:2d5e2ed44c22
4 local id = function (v) return v end 4 local id = function (v) return v end
5 5
6 function handlers.options(a, k, b) 6 function handlers.options(a, k, b)
7 local o = a[k] or { }; 7 local o = a[k] or { };
8 if type(b) ~= "table" then b = { b } end 8 if type(b) ~= "table" then b = { b } end
9 for k,v in pairs(b) do 9 for key, value in pairs(b) do
10 if v == true or v == false then 10 if value == true or value == false then
11 o[k] = v; 11 o[key] = value;
12 else 12 else
13 o[v] = true; 13 o[value] = true;
14 end 14 end
15 end 15 end
16 a[k] = o; 16 a[k] = o;
17 end 17 end
18 18