mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Change EventHandler to store IntrusivePtr<Func>
Also deprecates the LocalHandler() and SetLocalHandler() methods, replaced with GetFunc() and SetFunc().
This commit is contained in:
parent
3b6f60a810
commit
fbc7725278
4 changed files with 20 additions and 27 deletions
|
@ -164,14 +164,14 @@ void ID::SetVal(IntrusivePtr<Val> v, bool arg_weak_ref)
|
|||
if ( ! handler )
|
||||
{
|
||||
handler = new EventHandler(name);
|
||||
handler->SetLocalHandler(val->AsFunc());
|
||||
handler->SetFunc(val->AsFuncPtr());
|
||||
event_registry->Register(handler);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, internally defined events cannot
|
||||
// have local handler.
|
||||
handler->SetLocalHandler(val->AsFunc());
|
||||
handler->SetFunc(val->AsFuncPtr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue