mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10: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
|
@ -129,7 +129,7 @@ void Func::AddBody(const detail::FunctionIngredients& ingr, detail::StmtPtr new_
|
|||
void Func::AddBody(detail::StmtPtr new_body, const std::vector<detail::IDPtr>& new_inits, size_t new_frame_size,
|
||||
int priority) {
|
||||
std::set<EventGroupPtr> groups;
|
||||
AddBody(new_body, new_inits, new_frame_size, priority, groups);
|
||||
AddBody(std::move(new_body), new_inits, new_frame_size, priority, groups);
|
||||
}
|
||||
|
||||
void Func::AddBody(detail::StmtPtr new_body, size_t new_frame_size) {
|
||||
|
@ -143,7 +143,7 @@ void Func::AddBody(detail::StmtPtr /* new_body */, const std::vector<detail::IDP
|
|||
Internal("Func::AddBody called");
|
||||
}
|
||||
|
||||
void Func::AddBody(detail::StdFunctionStmt::FunctionVariant body, int priority) {
|
||||
void Func::AddBody(std::function<void(const zeek::Args&, detail::StmtFlowType&)> body, int priority) {
|
||||
auto stmt = zeek::make_intrusive<detail::StdFunctionStmt>(std::move(body));
|
||||
AddBody(stmt, {}, priority);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue