]> granicus.if.org Git - icinga2/commitdiff
Add missing arguments
authorGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 28 Mar 2017 11:24:21 +0000 (13:24 +0200)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 28 Mar 2017 11:24:21 +0000 (13:24 +0200)
refs #5087

lib/base/string-script.cpp
lib/icinga/macroprocessor.cpp

index e72370e51dc416ed7eac83e527c08b1e65388cba..60af63ddab1fcc7db77d4059ec0127fc3ff729c5 100644 (file)
@@ -150,7 +150,7 @@ Object::Ptr String::GetPrototype(void)
                prototype->Set("substr", new Function("String#substr", WrapFunction(StringSubstr), { "start", "len" }, true));
                prototype->Set("upper", new Function("String#upper", WrapFunction(StringUpper), {}, true));
                prototype->Set("lower", new Function("String#lower", WrapFunction(StringLower), {}, true));
-               prototype->Set("split", new Function("String#split", WrapFunction(StringSplit), {}, true));
+               prototype->Set("split", new Function("String#split", WrapFunction(StringSplit), { "delims" }, true));
                prototype->Set("find", new Function("String#find", WrapFunction(StringFind), { "str", "start" }, true));
                prototype->Set("contains", new Function("String#contains", WrapFunction(StringContains), { "str" }, true));
                prototype->Set("replace", new Function("String#replace", WrapFunction(StringReplace), { "search", "replacement" }, true));
index 37d5d48cc77e76e0c0d836f401411eedb73b62d2..2027ef82f8416ec8e8d78b13de74115d02dd101c 100644 (file)
@@ -217,7 +217,7 @@ Value MacroProcessor::EvaluateFunction(const Function::Ptr& func, const Resolver
 
        resolvers_this->Set("macro", new Function("macro (temporary)", boost::bind(&MacroProcessor::InternalResolveMacrosShim,
            _1, boost::cref(resolvers), cr, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros,
-           recursionLevel + 1)));
+           recursionLevel + 1), { "str" }));
        resolvers_this->Set("resolve_arguments", new Function("resolve_arguments (temporary)", boost::bind(&MacroProcessor::InternalResolveArgumentsShim,
            _1, boost::cref(resolvers), cr, resolvedMacros, useResolvedMacros,
            recursionLevel + 1)));