mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Hook functions now directly callable instead of w/ "hook" statements.
The return value of the call is an implicit boolean value of T if all hook handlers ran, or F if one hook handler exited as a result of a break statement and potentially prevented other handlers from running. Scripts don't need to declare hooks with an explicit return type of bool (internally, that's assumed), and any values given to (optional) return statements in handler definitions are just ignored. Addresses #918.
This commit is contained in:
parent
e2fdf16e0c
commit
378ee699ff
15 changed files with 108 additions and 145 deletions
|
@ -165,7 +165,6 @@ SERIAL_STMT(EVENT_BODY_LIST, 16)
|
|||
SERIAL_STMT(INIT_STMT, 17)
|
||||
SERIAL_STMT(NULL_STMT, 18)
|
||||
SERIAL_STMT(WHEN_STMT, 19)
|
||||
SERIAL_STMT(HOOK_STMT, 20)
|
||||
|
||||
#define SERIAL_TYPE(name, val) SERIAL_CONST(name, val, BRO_TYPE)
|
||||
SERIAL_TYPE(BRO_TYPE, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue