Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()

This also changes the argument type of Func::operator() to zeek::Args*
to allow plugins to be able to alter function arguments in place as
was previously documented.
This commit is contained in:
Jon Siwek 2020-05-22 21:01:38 -07:00
parent 46c5dea733
commit 272db640aa
27 changed files with 417 additions and 77 deletions

View file

@ -1879,7 +1879,7 @@ IntrusivePtr<Val> TableVal::Default(const IntrusivePtr<Val>& index)
try
{
result = f->operator()(vl);
result = f->operator()(&vl);
}
catch ( InterpreterException& e )
@ -2088,7 +2088,7 @@ void TableVal::CallChangeFunc(const Val* index,
vl.emplace_back(old_value);
in_change_func = true;
f->operator()(vl);
f->operator()(&vl);
}
catch ( InterpreterException& e )
{
@ -2545,7 +2545,7 @@ double TableVal::CallExpireFunc(IntrusivePtr<ListVal> idx)
vl.emplace_back(std::move(idx));
}
auto result = f->operator()(vl);
auto result = f->operator()(&vl);
if ( result )
secs = result->AsInterval();