mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +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
|
@ -743,7 +743,7 @@ RecordVal* Manager::MakeEvent(val_list* args, Frame* frame)
|
|||
const auto& got_type = (*args)[i]->GetType();
|
||||
const auto& expected_type = func->GetType()->ParamList()->Types()[i - 1];
|
||||
|
||||
if ( ! same_type(got_type.get(), expected_type.get()) )
|
||||
if ( ! same_type(got_type, expected_type) )
|
||||
{
|
||||
rval->Assign(0, nullptr);
|
||||
Error("event parameter #%d type mismatch, got %s, expect %s", i,
|
||||
|
@ -754,7 +754,7 @@ RecordVal* Manager::MakeEvent(val_list* args, Frame* frame)
|
|||
|
||||
IntrusivePtr<RecordVal> data_val;
|
||||
|
||||
if ( same_type(got_type.get(), bro_broker::DataVal::ScriptDataType()) )
|
||||
if ( same_type(got_type, bro_broker::DataVal::ScriptDataType()) )
|
||||
data_val = {NewRef{}, (*args)[i]->AsRecordVal()};
|
||||
else
|
||||
data_val = make_data_val((*args)[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue