mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Add same_type() overloads for IntrusivePtr args
This commit is contained in:
parent
2c4cc95e7c
commit
6a1c312451
17 changed files with 145 additions and 136 deletions
|
@ -229,9 +229,7 @@ void Manager::RemoveDisabledWriters(Stream* stream)
|
|||
|
||||
bool Manager::CreateStream(EnumVal* id, RecordVal* sval)
|
||||
{
|
||||
RecordType* rtype = sval->GetType()->AsRecordType();
|
||||
|
||||
if ( ! same_type(rtype, zeek::BifType::Record::Log::Stream.get(), false) )
|
||||
if ( ! same_type(sval->GetType(), zeek::BifType::Record::Log::Stream, false) )
|
||||
{
|
||||
reporter->Error("sval argument not of right type");
|
||||
return false;
|
||||
|
@ -286,7 +284,7 @@ bool Manager::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( ! same_type(args[0].get(), columns) )
|
||||
if ( ! same_type(args[0], columns) )
|
||||
{
|
||||
reporter->Error("stream event's argument type does not match column record type");
|
||||
return false;
|
||||
|
@ -528,9 +526,7 @@ bool Manager::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt,
|
|||
|
||||
bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
|
||||
{
|
||||
RecordType* rtype = fval->GetType()->AsRecordType();
|
||||
|
||||
if ( ! same_type(rtype, zeek::BifType::Record::Log::Filter.get(), false) )
|
||||
if ( ! same_type(fval->GetType(), zeek::BifType::Record::Log::Filter, false) )
|
||||
{
|
||||
reporter->Error("filter argument not of right type");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue