mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Switch RecordVal::CoerceTo() to use IntrusivePtr
This commit is contained in:
parent
fcaade6e31
commit
cda4738407
6 changed files with 39 additions and 28 deletions
|
@ -701,7 +701,7 @@ bool Manager::Write(EnumVal* id, RecordVal* columns_arg)
|
|||
if ( ! stream->enabled )
|
||||
return true;
|
||||
|
||||
auto columns = columns_arg->CoerceTo(stream->columns);
|
||||
auto columns = columns_arg->CoerceTo({NewRef{}, stream->columns});
|
||||
|
||||
if ( ! columns )
|
||||
{
|
||||
|
@ -747,7 +747,7 @@ bool Manager::Write(EnumVal* id, RecordVal* columns_arg)
|
|||
const auto& rt = filter->path_func->GetType()->Params()->GetFieldType("rec");
|
||||
|
||||
if ( rt->Tag() == TYPE_RECORD )
|
||||
rec_arg = columns->CoerceTo(rt->AsRecordType(), true);
|
||||
rec_arg = columns->CoerceTo(cast_intrusive<RecordType>(rt), true);
|
||||
else
|
||||
// Can be TYPE_ANY here.
|
||||
rec_arg = columns;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue