mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Deprecate VectorVal(VectorType*) ctora
Adds a new one taking an IntrusivePtr.
This commit is contained in:
parent
c5236ecaee
commit
d4dba40727
51 changed files with 171 additions and 160 deletions
|
@ -68,15 +68,10 @@ VectorVal* BroSubstring::VecToPolicy(Vec* vec)
|
|||
if ( ! sw_align_type )
|
||||
return nullptr;
|
||||
|
||||
VectorType* sw_align_vec_type =
|
||||
zeek::lookup_type("sw_align_vec")->AsVectorType();
|
||||
if ( ! sw_align_vec_type )
|
||||
return nullptr;
|
||||
auto sw_align_vec_type = zeek::lookup_type<VectorType>("sw_align_vec");
|
||||
|
||||
VectorVal* result =
|
||||
new VectorVal(zeek::lookup_type("sw_substring_vec")->AsVectorType());
|
||||
if ( ! result )
|
||||
return nullptr;
|
||||
auto result =
|
||||
make_intrusive<VectorVal>(zeek::lookup_type<VectorType>("sw_substring_vec"));
|
||||
|
||||
if ( vec )
|
||||
{
|
||||
|
@ -106,7 +101,7 @@ VectorVal* BroSubstring::VecToPolicy(Vec* vec)
|
|||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result.release();
|
||||
}
|
||||
|
||||
BroSubstring::Vec* BroSubstring::VecFromPolicy(VectorVal* vec)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue