mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Deprecate TableVal::Lookup(), replace with Find()/FindOrDefault()
This commit is contained in:
parent
b85cfc6fe4
commit
85a0ddd62d
17 changed files with 105 additions and 63 deletions
|
@ -2669,7 +2669,7 @@ IntrusivePtr<Val> IndexExpr::Fold(Val* v1, Val* v2) const
|
|||
break;
|
||||
|
||||
case TYPE_TABLE:
|
||||
v = v1->AsTableVal()->Lookup(v2); // Then, we jump into the TableVal here.
|
||||
v = v1->AsTableVal()->FindOrDefault({NewRef{}, v2}); // Then, we jump into the TableVal here.
|
||||
break;
|
||||
|
||||
case TYPE_STRING:
|
||||
|
@ -3995,7 +3995,7 @@ IntrusivePtr<Val> InExpr::Fold(Val* v1, Val* v2) const
|
|||
if ( is_vector(v2) )
|
||||
res = (bool)v2->AsVectorVal()->Lookup(v1);
|
||||
else
|
||||
res = (bool)v2->AsTableVal()->Lookup(v1, false);
|
||||
res = (bool)v2->AsTableVal()->Find({NewRef{}, v1});
|
||||
|
||||
return val_mgr->Bool(res);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue