mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Remove variant from StdFunctionStmt
The variant ended up conflicting with std::bind, which resulted in failures on the btest invoking it. Change back to a single function that takes a flow, and default it to a value in Exec.
This commit is contained in:
parent
8bfe32e931
commit
9de1dd16d5
6 changed files with 14 additions and 17 deletions
|
@ -2087,12 +2087,9 @@ TraversalCode WhenStmt::Traverse(TraversalCallback* cb) const {
|
|||
ValPtr StdFunctionStmt::Exec(Frame* f, StmtFlowType& flow) {
|
||||
zeek::Args args = *f->GetFuncArgs();
|
||||
|
||||
if ( func.index() == 0 ) {
|
||||
flow = FLOW_NEXT;
|
||||
std::get<0>(func)(args);
|
||||
}
|
||||
else
|
||||
std::get<1>(func)(args, flow);
|
||||
// Set this to NEXT by default. The function can override that if it wants.
|
||||
flow = FLOW_NEXT;
|
||||
func(args, flow);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue