mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
IndexType: Add IsPatternIndex(), like IsSubNetIndex()
This commit is contained in:
parent
074f51fc96
commit
c8bab6a0ec
5 changed files with 16 additions and 9 deletions
|
@ -391,8 +391,7 @@ string CPPCompile::GenIndexExpr(const Expr* e, GenType gt) {
|
|||
auto ind_expr = e->GetOp2()->AsListExpr()->Exprs()[0];
|
||||
auto is_pat_str_ind = false;
|
||||
|
||||
auto& indices = aggr_t->AsTableType()->GetIndices()->GetTypes();
|
||||
if ( indices.size() == 1 && indices[0]->Tag() == TYPE_PATTERN && ind_expr->GetType()->Tag() == TYPE_STRING )
|
||||
if ( aggr_t->AsTableType()->IsPatternIndex() && ind_expr->GetType()->Tag() == TYPE_STRING )
|
||||
is_pat_str_ind = true;
|
||||
|
||||
if ( inside_when ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue