mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-21 11:23:35 +02:00
MINOR: pattern: make the delete and prune functions more generic
Now we have a single prune() function to act on an expression, and one delete function for the lists and one for the trees. The presence of a pointer in the lists is enough to warrant a free, and we rely on the PAT_SF_REGFREE flag to decide whether to free using free() or regfree().
This commit is contained in:
@@ -83,11 +83,9 @@ int pat_idx_tree_pfx(struct pattern_expr *expr, struct pattern *pat, char **err)
|
||||
* never fails.
|
||||
*
|
||||
*/
|
||||
void pat_del_list_val(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
void pat_del_list_gen(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
void pat_del_tree_ip(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
void pat_del_list_ptr(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
void pat_del_tree_str(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
void pat_del_list_reg(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -95,9 +93,7 @@ void pat_del_list_reg(struct pattern_expr *expr, struct pat_ref_elt *ref);
|
||||
* reset the tree and list root.
|
||||
*
|
||||
*/
|
||||
void pat_prune_val(struct pattern_expr *expr);
|
||||
void pat_prune_ptr(struct pattern_expr *expr);
|
||||
void pat_prune_reg(struct pattern_expr *expr);
|
||||
void pat_prune_gen(struct pattern_expr *expr);
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user