mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Add a method to register an event handler to a std::function via C++
This commit is contained in:
parent
aac723cfe5
commit
39890fda5e
9 changed files with 65 additions and 2 deletions
|
@ -143,6 +143,11 @@ 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) {
|
||||
auto stmt = zeek::make_intrusive<detail::StdFunctionStmt>(std::move(body));
|
||||
AddBody(stmt, {}, priority);
|
||||
}
|
||||
|
||||
void Func::SetScope(detail::ScopePtr newscope) { scope = std::move(newscope); }
|
||||
|
||||
FuncPtr Func::DoClone() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue