mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Change signature of &on_change handler
After thinking about this for quite a while (and starting implementation) - for now I think it is much easier to not allow the table &on_change handler to change the result of a change - but to only be notified that a change happened. I might re-think this lateron - the reasoning is that this makes development easier, and that I am not quite sure about potential side-effects for things that assume that a table change does take effect.
This commit is contained in:
parent
68167d14aa
commit
5b5d36cd83
1 changed files with 2 additions and 2 deletions
|
@ -497,9 +497,9 @@ void Attributes::CheckAttr(Attr* a)
|
|||
|
||||
const FuncType *c_ft = change_func->Type()->AsFuncType();
|
||||
|
||||
if ( c_ft->YieldType()->Tag() != TYPE_BOOL )
|
||||
if ( c_ft->YieldType()->Tag() != TYPE_VOID )
|
||||
{
|
||||
Error("&on_change must yield a value of type bool");
|
||||
Error("&on_change must not return a value");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue