mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Type: return IntrusivePtr
This commit is contained in:
parent
0a6ddfb6b5
commit
ba35ebec4c
38 changed files with 319 additions and 334 deletions
|
@ -42,10 +42,9 @@ function Files::__set_reassembly_buffer%(file_id: string, max: count%): bool
|
|||
function Files::__add_analyzer%(file_id: string, tag: Files::Tag, args: any%): bool
|
||||
%{
|
||||
using BifType::Record::Files::AnalyzerArgs;
|
||||
RecordVal* rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
auto rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
bool result = file_mgr->AddAnalyzer(file_id->CheckString(),
|
||||
file_mgr->GetComponentTag(tag), rv);
|
||||
Unref(rv);
|
||||
file_mgr->GetComponentTag(tag), rv.get());
|
||||
return val_mgr->GetBool(result);
|
||||
%}
|
||||
|
||||
|
@ -53,10 +52,9 @@ function Files::__add_analyzer%(file_id: string, tag: Files::Tag, args: any%): b
|
|||
function Files::__remove_analyzer%(file_id: string, tag: Files::Tag, args: any%): bool
|
||||
%{
|
||||
using BifType::Record::Files::AnalyzerArgs;
|
||||
RecordVal* rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
auto rv = args->AsRecordVal()->CoerceTo(AnalyzerArgs);
|
||||
bool result = file_mgr->RemoveAnalyzer(file_id->CheckString(),
|
||||
file_mgr->GetComponentTag(tag) , rv);
|
||||
Unref(rv);
|
||||
file_mgr->GetComponentTag(tag) , rv.get());
|
||||
return val_mgr->GetBool(result);
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue