Improve Func.h inclusion

Now forward declares some Broker types since Broker/CAF headers
generally slow things down and also Coverity Scan currently has a
catastrophic error on some CAF headers.

Also a few other changes to EventHandler/BifReturnVal to reduce number
of places that depend on Func.h.
This commit is contained in:
Jon Siwek 2020-06-05 17:57:42 -07:00
parent ef6bd3ee39
commit 2893eea045
11 changed files with 66 additions and 36 deletions

View file

@ -44,6 +44,12 @@ const IntrusivePtr<FuncType>& EventHandler::GetType(bool check_export)
return type;
}
void EventHandler::SetFunc(IntrusivePtr<Func> f)
{ local = std::move(f); }
void EventHandler::SetLocalHandler(Func* f)
{ SetFunc({NewRef{}, f}); }
void EventHandler::Call(zeek::Args* vl, bool no_remote)
{
#ifdef PROFILE_BRO_FUNCTIONS