Remove Plugin::HookCallFunction and fix tests related to it

This commit is contained in:
Tim Wojtulewicz 2021-01-25 16:36:59 -07:00
parent 725e759560
commit 5f09793ce1
8 changed files with 6 additions and 180 deletions

View file

@ -376,27 +376,7 @@ std::pair<bool, ValPtr>
Plugin::HookFunctionCall(const Func* func, zeek::detail::Frame* parent,
Args* args)
{
ValPList vlargs(args->size());
for ( auto& v : *args )
vlargs.push_back(v.release());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
auto [handled, result] = HookCallFunction(func, parent, &vlargs);
#pragma GCC diagnostic pop
for ( auto i = 0u; i < args->size(); ++i )
(*args)[i] = {AdoptRef{}, vlargs[i]};
return {handled, {AdoptRef{}, result}};
}
std::pair<bool, Val*> Plugin::HookCallFunction(
const Func* func, zeek::detail::Frame *parent, ValPList* args)
{
std::pair<bool, Val*> result(false, NULL);
return result;
return {false, nullptr};
}
bool Plugin::HookQueueEvent(Event* event)

View file

@ -677,9 +677,6 @@ protected:
virtual std::pair<bool, ValPtr>
HookFunctionCall(const Func* func, zeek::detail::Frame* parent, Args* args);
[[deprecated("Remove in v4.1. Use HookFunctionCall()")]]
virtual std::pair<bool, Val*> HookCallFunction(const Func* func, zeek::detail::Frame *parent, ValPList* args);
/**
* Hook into raising events. Whenever the script interpreter is about
* to queue an event for later execution, it first gives all plugins