mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Val: add TableVal::Assign() overload with IntrusivePtr
Prepare the transition to IntrusivePtr for various callers.
This commit is contained in:
parent
78712d009f
commit
0a6ddfb6b5
54 changed files with 379 additions and 365 deletions
|
@ -140,13 +140,13 @@ void EventHandler::NewEvent(val_list* vl)
|
|||
BroType* ftype = args->FieldType(i);
|
||||
Val* fdefault = args->FieldDefault(i);
|
||||
|
||||
RecordVal* rec = new RecordVal(call_argument);
|
||||
rec->Assign(0, new StringVal(fname));
|
||||
auto rec = make_intrusive<RecordVal>(call_argument);
|
||||
rec->Assign(0, make_intrusive<StringVal>(fname));
|
||||
|
||||
ODesc d;
|
||||
d.SetShort();
|
||||
ftype->Describe(&d);
|
||||
rec->Assign(1, new StringVal(d.Description()));
|
||||
rec->Assign(1, make_intrusive<StringVal>(d.Description()));
|
||||
|
||||
if ( fdefault )
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ void EventHandler::NewEvent(val_list* vl)
|
|||
rec->Assign(3, val);
|
||||
}
|
||||
|
||||
vargs->Assign(i, rec);
|
||||
vargs->Assign(i, std::move(rec));
|
||||
}
|
||||
|
||||
Event* ev = new Event(new_event, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue