mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Switch Frame::SetElement() to use IntrusivePtr
This commit is contained in:
parent
1c617c4f7a
commit
e9e2e388f8
5 changed files with 78 additions and 60 deletions
|
@ -365,11 +365,11 @@ IntrusivePtr<Val> BroFunc::operator()(zeek::Args* args, Frame* parent) const
|
|||
// Fill in the rest of the frame with the function's arguments.
|
||||
for ( auto j = 0u; j < args->size(); ++j )
|
||||
{
|
||||
Val* arg = (*args)[j].get();
|
||||
const auto& arg = (*args)[j];
|
||||
|
||||
if ( f->NthElement(j) != arg )
|
||||
// Either not yet set, or somebody reassigned the frame slot.
|
||||
f->SetElement(j, arg->Ref());
|
||||
f->SetElement(j, arg);
|
||||
}
|
||||
|
||||
f->Reset(args->size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue