From: Aki Tuomi Date: Tue, 23 Jan 2018 11:52:19 +0000 (+0200) Subject: lua-base4: Expose more DNSName methods X-Git-Tag: dnsdist-1.3.0~59^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d45048a5c402615acec452ed03cdbea522b6ff3a;p=thirdparty%2Fpdns.git lua-base4: Expose more DNSName methods These are needed to implement lua2 backend --- diff --git a/pdns/lua-base4.cc b/pdns/lua-base4.cc index 4ac452ab4d..e571304fdd 100644 --- a/pdns/lua-base4.cc +++ b/pdns/lua-base4.cc @@ -59,6 +59,9 @@ void BaseLua4::prepareContext() { // DNSName d_lw->writeFunction("newDN", [](const std::string& dom){ return DNSName(dom); }); + d_lw->registerFunction("__lt", &DNSName::operator<); + d_lw->registerFunction("canonCompare", &DNSName::canonCompare); + d_lw->registerFunction("makeRelative", &DNSName::makeRelative); d_lw->registerFunction("isPartOf", &DNSName::isPartOf); d_lw->registerFunction("countLabels", [](const DNSName& name) { return name.countLabels(); }); d_lw->registerFunction("wirelength", [](const DNSName& name) { return name.wirelength(); });