diff --git a/include/haproxy/pattern-t.h b/include/haproxy/pattern-t.h index 8c01760c0..477b2bbc6 100644 --- a/include/haproxy/pattern-t.h +++ b/include/haproxy/pattern-t.h @@ -216,7 +216,6 @@ struct pattern_head { int (*parse)(const char *text, struct pattern *pattern, int flags, char **err); int (*parse_smp)(const char *text, struct sample_data *data); int (*index)(struct pattern_expr *, struct pattern *, char **); - void (*delete)(struct pat_ref *, struct pat_ref_elt *); void (*prune)(struct pattern_expr *); struct pattern *(*match)(struct sample *, struct pattern_expr *, int); int expect_type; /* type of the expected sample (SMP_T_*) */ diff --git a/include/haproxy/pattern.h b/include/haproxy/pattern.h index 844bc9102..b6f1a3856 100644 --- a/include/haproxy/pattern.h +++ b/include/haproxy/pattern.h @@ -34,7 +34,6 @@ extern int pat_match_types[PAT_MATCH_NUM]; extern int (*pat_parse_fcts[PAT_MATCH_NUM])(const char *, struct pattern *, int, char **); extern int (*pat_index_fcts[PAT_MATCH_NUM])(struct pattern_expr *, struct pattern *, char **); -extern void (*pat_delete_fcts[PAT_MATCH_NUM])(struct pat_ref *, struct pat_ref_elt *); extern void (*pat_prune_fcts[PAT_MATCH_NUM])(struct pattern_expr *); extern struct pattern *(*pat_match_fcts[PAT_MATCH_NUM])(struct sample *, struct pattern_expr *, int); diff --git a/src/acl.c b/src/acl.c index 5dc77a0fd..abfcf21cc 100644 --- a/src/acl.c +++ b/src/acl.c @@ -340,7 +340,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = aclkw->parse ? aclkw->parse : pat_parse_fcts[aclkw->match_type]; expr->pat.index = aclkw->index ? aclkw->index : pat_index_fcts[aclkw->match_type]; expr->pat.match = aclkw->match ? aclkw->match : pat_match_fcts[aclkw->match_type]; - expr->pat.delete = aclkw->delete ? aclkw->delete : pat_delete_fcts[aclkw->match_type]; expr->pat.prune = aclkw->prune ? aclkw->prune : pat_prune_fcts[aclkw->match_type]; } @@ -354,7 +353,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = pat_parse_fcts[PAT_MATCH_BOOL]; expr->pat.index = pat_index_fcts[PAT_MATCH_BOOL]; expr->pat.match = pat_match_fcts[PAT_MATCH_BOOL]; - expr->pat.delete = pat_delete_fcts[PAT_MATCH_BOOL]; expr->pat.prune = pat_prune_fcts[PAT_MATCH_BOOL]; expr->pat.expect_type = pat_match_types[PAT_MATCH_BOOL]; break; @@ -362,7 +360,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = pat_parse_fcts[PAT_MATCH_INT]; expr->pat.index = pat_index_fcts[PAT_MATCH_INT]; expr->pat.match = pat_match_fcts[PAT_MATCH_INT]; - expr->pat.delete = pat_delete_fcts[PAT_MATCH_INT]; expr->pat.prune = pat_prune_fcts[PAT_MATCH_INT]; expr->pat.expect_type = pat_match_types[PAT_MATCH_INT]; break; @@ -372,7 +369,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = pat_parse_fcts[PAT_MATCH_IP]; expr->pat.index = pat_index_fcts[PAT_MATCH_IP]; expr->pat.match = pat_match_fcts[PAT_MATCH_IP]; - expr->pat.delete = pat_delete_fcts[PAT_MATCH_IP]; expr->pat.prune = pat_prune_fcts[PAT_MATCH_IP]; expr->pat.expect_type = pat_match_types[PAT_MATCH_IP]; break; @@ -380,7 +376,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = pat_parse_fcts[PAT_MATCH_STR]; expr->pat.index = pat_index_fcts[PAT_MATCH_STR]; expr->pat.match = pat_match_fcts[PAT_MATCH_STR]; - expr->pat.delete = pat_delete_fcts[PAT_MATCH_STR]; expr->pat.prune = pat_prune_fcts[PAT_MATCH_STR]; expr->pat.expect_type = pat_match_types[PAT_MATCH_STR]; break; @@ -465,7 +460,6 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.parse = pat_parse_fcts[idx]; expr->pat.index = pat_index_fcts[idx]; expr->pat.match = pat_match_fcts[idx]; - expr->pat.delete = pat_delete_fcts[idx]; expr->pat.prune = pat_prune_fcts[idx]; expr->pat.expect_type = pat_match_types[idx]; args++; diff --git a/src/map.c b/src/map.c index 8cfbbe51a..ee022e29b 100644 --- a/src/map.c +++ b/src/map.c @@ -120,7 +120,6 @@ int sample_load_map(struct arg *arg, struct sample_conv *conv, desc->pat.match = pat_match_fcts[(long)conv->private]; desc->pat.parse = pat_parse_fcts[(long)conv->private]; desc->pat.index = pat_index_fcts[(long)conv->private]; - desc->pat.delete = pat_delete_fcts[(long)conv->private]; desc->pat.prune = pat_prune_fcts[(long)conv->private]; desc->pat.expect_type = pat_match_types[(long)conv->private]; diff --git a/src/pattern.c b/src/pattern.c index 89a5c4844..6659364c7 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -79,23 +79,6 @@ int (*pat_index_fcts[PAT_MATCH_NUM])(struct pattern_expr *, struct pattern *, ch [PAT_MATCH_REGM] = pat_idx_list_regm, }; -void (*pat_delete_fcts[PAT_MATCH_NUM])(struct pat_ref *, struct pat_ref_elt *) = { - [PAT_MATCH_FOUND] = pat_delete_gen, - [PAT_MATCH_BOOL] = pat_delete_gen, - [PAT_MATCH_INT] = pat_delete_gen, - [PAT_MATCH_IP] = pat_delete_gen, - [PAT_MATCH_BIN] = pat_delete_gen, - [PAT_MATCH_LEN] = pat_delete_gen, - [PAT_MATCH_STR] = pat_delete_gen, - [PAT_MATCH_BEG] = pat_delete_gen, - [PAT_MATCH_SUB] = pat_delete_gen, - [PAT_MATCH_DIR] = pat_delete_gen, - [PAT_MATCH_DOM] = pat_delete_gen, - [PAT_MATCH_END] = pat_delete_gen, - [PAT_MATCH_REG] = pat_delete_gen, - [PAT_MATCH_REGM] = pat_delete_gen, -}; - void (*pat_prune_fcts[PAT_MATCH_NUM])(struct pattern_expr *) = { [PAT_MATCH_FOUND] = pat_prune_gen, [PAT_MATCH_BOOL] = pat_prune_gen,