mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Type: use class IntrusivePtr in TypeList
This commit is contained in:
parent
de0289125b
commit
73cea5dcad
13 changed files with 62 additions and 74 deletions
|
@ -21,8 +21,8 @@ static void analyzer_del_func(void* v)
|
|||
AnalyzerSet::AnalyzerSet(File* arg_file) : file(arg_file)
|
||||
{
|
||||
auto t = make_intrusive<TypeList>();
|
||||
t->Append(file_mgr->GetTagEnumType()->Ref());
|
||||
t->Append(BifType::Record::Files::AnalyzerArgs->Ref());
|
||||
t->Append({NewRef{}, file_mgr->GetTagEnumType()});
|
||||
t->Append({NewRef{}, BifType::Record::Files::AnalyzerArgs});
|
||||
analyzer_hash = new CompositeHash(std::move(t));
|
||||
analyzer_map.SetDeleteFunc(analyzer_del_func);
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ using namespace file_analysis;
|
|||
|
||||
static Val* empty_connection_table()
|
||||
{
|
||||
auto tbl_index = make_intrusive<TypeList>(conn_id);
|
||||
tbl_index->Append(conn_id->Ref());
|
||||
auto tbl_index = make_intrusive<TypeList>(IntrusivePtr{NewRef{}, conn_id});
|
||||
tbl_index->Append({NewRef{}, conn_id});
|
||||
auto tbl_type = make_intrusive<TableType>(std::move(tbl_index), IntrusivePtr{NewRef{}, connection_type});
|
||||
return new TableVal(std::move(tbl_type));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue