mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Val: RecordVal::LookupWithDefault() returns IntrusivePtr
This commit is contained in:
parent
d180ab0dd2
commit
79570fdfd6
9 changed files with 66 additions and 115 deletions
|
@ -163,18 +163,14 @@ void File::RaiseFileOverNewConnection(Connection* conn, bool is_orig)
|
|||
|
||||
uint64_t File::LookupFieldDefaultCount(int idx) const
|
||||
{
|
||||
Val* v = val->LookupWithDefault(idx);
|
||||
uint64_t rval = v->AsCount();
|
||||
Unref(v);
|
||||
return rval;
|
||||
auto v = val->LookupWithDefault(idx);
|
||||
return v->AsCount();
|
||||
}
|
||||
|
||||
double File::LookupFieldDefaultInterval(int idx) const
|
||||
{
|
||||
Val* v = val->LookupWithDefault(idx);
|
||||
double rval = v->AsInterval();
|
||||
Unref(v);
|
||||
return rval;
|
||||
auto v = val->LookupWithDefault(idx);
|
||||
return v->AsInterval();
|
||||
}
|
||||
|
||||
int File::Idx(const string& field, const RecordType* type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue