mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Enable passing events into bifs.
When an event was globally decleared, previously it did not get assigned a value initially until the first implementation body was added. That then triggered an "not used" error when passing such an event as argument into a bif. Now we always assign a function value immediately, just without any body inititally. When globally declaring an event, i
This commit is contained in:
parent
3fbb3c0fcd
commit
c0cd62a5a5
2 changed files with 18 additions and 4 deletions
12
src/Func.cc
12
src/Func.cc
|
@ -239,11 +239,15 @@ BroFunc::BroFunc(ID* arg_id, Stmt* arg_body, id_list* aggr_inits,
|
|||
: Func(BRO_FUNC)
|
||||
{
|
||||
id = arg_id;
|
||||
Body b;
|
||||
b.stmts = AddInits(arg_body, aggr_inits);
|
||||
b.priority = 0;
|
||||
bodies.push_back(b);
|
||||
frame_size = arg_frame_size;
|
||||
|
||||
if ( arg_body )
|
||||
{
|
||||
Body b;
|
||||
b.stmts = AddInits(arg_body, aggr_inits);
|
||||
b.priority = 0;
|
||||
bodies.push_back(b);
|
||||
}
|
||||
}
|
||||
|
||||
BroFunc::~BroFunc()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue