]> 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:22:54 +0000 (10:22 +0100)
pdns/dnsdist-lua.cc

index c20cf6bbd43de2483f2f8b40995f4b5666dfdef1..43b1326a1c126d9feaa0d3949855f2ee30665c28 100644 (file)
@@ -728,7 +728,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(); });