]> granicus.if.org Git - pdns/commitdiff
Restore the Lua binding for DNSName::wirelength()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 30 Jul 2019 06:38:42 +0000 (08:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 30 Jul 2019 06:38:42 +0000 (08:38 +0200)
c052aac71b2ff336ca59421a5bee30564ce9562a renamed it to DNSName::wireLength()
while documenting the DNSName bindings in the auth, unfortunately
breaking compatibility in the recursor.

pdns/lua-base4.cc

index 39dbb391c3abdcad7f65e15dbd12bb6e32459f25..a91b624b842a816087c400428c9dd8d9c49703a4 100644 (file)
@@ -66,6 +66,7 @@ void BaseLua4::prepareContext() {
   d_lw->registerFunction("getRawLabels", &DNSName::getRawLabels);
   d_lw->registerFunction<unsigned int(DNSName::*)()>("countLabels", [](const DNSName& name) { return name.countLabels(); });
   d_lw->registerFunction<size_t(DNSName::*)()>("wireLength", [](const DNSName& name) { return name.wirelength(); });
+  d_lw->registerFunction<size_t(DNSName::*)()>("wirelength", [](const DNSName& name) { return name.wirelength(); });
   d_lw->registerFunction<bool(DNSName::*)(const std::string&)>("equal", [](const DNSName& lhs, const std::string& rhs) { return lhs==DNSName(rhs); });
   d_lw->registerEqFunction(&DNSName::operator==);
   d_lw->registerToStringFunction<string(DNSName::*)()>([](const DNSName&dn ) { return dn.toString(); });