mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
Backed out changeset eae606b9266c: Used a lot of memory
This commit is contained in:
parent
b7fc41affc
commit
28e486f3df
1 changed files with 4 additions and 5 deletions
|
@ -86,10 +86,9 @@ local function highbyte(i) -- - - - - - - - - - - - - - - - - - - highbyte
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function augment (t, prefix) -- - - - - - - - - - - - - - - - - augment
|
local function augment (t) -- - - - - - - - - - - - - - - - - - - - augment
|
||||||
local a = {};
|
local a = {};
|
||||||
for i = 1, 0xffff do
|
for i,s in pairs(t) do
|
||||||
local s = t[i] or ("%s%d"):format(prefix, i);
|
|
||||||
a[i] = s;
|
a[i] = s;
|
||||||
a[s] = s;
|
a[s] = s;
|
||||||
a[string.lower(s)] = s;
|
a[string.lower(s)] = s;
|
||||||
|
@ -120,8 +119,8 @@ dns.types = {
|
||||||
dns.classes = { 'IN', 'CS', 'CH', 'HS', [255] = '*' };
|
dns.classes = { 'IN', 'CS', 'CH', 'HS', [255] = '*' };
|
||||||
|
|
||||||
|
|
||||||
dns.type = augment (dns.types, "TYPE");
|
dns.type = augment (dns.types);
|
||||||
dns.class = augment (dns.classes, "CLASS");
|
dns.class = augment (dns.classes);
|
||||||
dns.typecode = encode (dns.types);
|
dns.typecode = encode (dns.types);
|
||||||
dns.classcode = encode (dns.classes);
|
dns.classcode = encode (dns.classes);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue