mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/hook'
* origin/topic/jsiwek/hook: Add memory leak unit test for "hook" function flavor. Add new function flavor called a "hook".
This commit is contained in:
commit
d9bb9e0eb1
31 changed files with 578 additions and 79 deletions
|
@ -107,7 +107,8 @@ void ID::SetVal(Val* v, Opcode op, bool arg_weak_ref)
|
|||
#endif
|
||||
|
||||
if ( type && val &&
|
||||
type->Tag() == TYPE_FUNC && type->AsFuncType()->IsEvent() )
|
||||
type->Tag() == TYPE_FUNC &&
|
||||
type->AsFuncType()->Flavor() == FUNC_FLAVOR_EVENT )
|
||||
{
|
||||
EventHandler* handler = event_registry->Lookup(name);
|
||||
if ( ! handler )
|
||||
|
@ -657,7 +658,7 @@ void ID::DescribeReSTShort(ODesc* d) const
|
|||
break;
|
||||
|
||||
case TYPE_FUNC:
|
||||
d->Add(type->AsFuncType()->IsEvent() ? "event" : type_name(t));
|
||||
d->Add(type->AsFuncType()->FlavorString());
|
||||
break;
|
||||
|
||||
case TYPE_ENUM:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue