mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Migrate Tag classes to use IntrusivePtr
Deprecates various methods that previously took raw pointers
This commit is contained in:
parent
b096e552d3
commit
1abed4fd4c
20 changed files with 174 additions and 85 deletions
|
@ -21,7 +21,7 @@ static void analyzer_del_func(void* v)
|
|||
AnalyzerSet::AnalyzerSet(File* arg_file) : file(arg_file)
|
||||
{
|
||||
auto t = make_intrusive<TypeList>();
|
||||
t->Append({NewRef{}, file_mgr->GetTagEnumType()});
|
||||
t->Append(file_mgr->GetTagType());
|
||||
t->Append({NewRef{}, BifType::Record::Files::AnalyzerArgs});
|
||||
analyzer_hash = new CompositeHash(std::move(t));
|
||||
analyzer_map.SetDeleteFunc(analyzer_del_func);
|
||||
|
@ -164,7 +164,7 @@ bool AnalyzerSet::RemoveMod::Perform(AnalyzerSet* set)
|
|||
HashKey* AnalyzerSet::GetKey(const file_analysis::Tag& t, RecordVal* args) const
|
||||
{
|
||||
ListVal* lv = new ListVal(TYPE_ANY);
|
||||
lv->Append({NewRef{}, t.AsEnumVal()});
|
||||
lv->Append(t.AsVal());
|
||||
lv->Append({NewRef{}, args});
|
||||
HashKey* key = analyzer_hash->ComputeHash(lv, true);
|
||||
Unref(lv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue