mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Remove Plugin::HookCallFunction and fix tests related to it
This commit is contained in:
parent
725e759560
commit
5f09793ce1
8 changed files with 6 additions and 180 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue