mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Port remaining file analysis API to use IntrusivePtr
This commit is contained in:
parent
57a6069cd1
commit
b1042e2824
8 changed files with 117 additions and 75 deletions
|
@ -44,7 +44,8 @@ function Files::__add_analyzer%(file_id: string, tag: Files::Tag, args: any%): b
|
|||
using zeek::BifType::Record::Files::AnalyzerArgs;
|
||||
auto rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
bool result = file_mgr->AddAnalyzer(file_id->CheckString(),
|
||||
file_mgr->GetComponentTag(tag), rv.get());
|
||||
file_mgr->GetComponentTag(tag),
|
||||
std::move(rv));
|
||||
return val_mgr->Bool(result);
|
||||
%}
|
||||
|
||||
|
@ -54,7 +55,8 @@ function Files::__remove_analyzer%(file_id: string, tag: Files::Tag, args: any%)
|
|||
using zeek::BifType::Record::Files::AnalyzerArgs;
|
||||
auto rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
bool result = file_mgr->RemoveAnalyzer(file_id->CheckString(),
|
||||
file_mgr->GetComponentTag(tag) , rv.get());
|
||||
file_mgr->GetComponentTag(tag),
|
||||
std::move(rv));
|
||||
return val_mgr->Bool(result);
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue