]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
new default parameters for toString mess up lua's autodetection of signature template
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 16 Dec 2015 09:21:52 +0000 (10:21 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 16 Dec 2015 09:21:52 +0000 (10:21 +0100)
pdns/dnsdist-lua.cc

index 4f3ac9de0bd2015b3d2408b23378b48c9bb5c135..23879d179b0b71baaf6d32e71d625253d8e5fc2f 100644 (file)
@@ -732,7 +732,7 @@ vector<std::function<void(void)>> setupLua(bool client, const std::string& confi
   g_lua.registerFunction("tostring", &ComboAddress::toString);
 
   g_lua.registerFunction("isPartOf", &DNSName::isPartOf);
-  g_lua.registerFunction("tostring", &DNSName::toString);
+  g_lua.registerFunction<string(DNSName::*)()>("tostring", [](const DNSName&dn ) { return dn.toString(); });
   g_lua.writeFunction("newDNSName", [](const std::string& name) { return DNSName(name); });
   g_lua.writeFunction("newSuffixMatchNode", []() { return SuffixMatchNode(); });