diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2022-10-18 03:58:19 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2022-10-18 03:58:19 +0200 |
commit | e471f9e0fb7ade475dd3eb8b230bcb440877ee7e (patch) | |
tree | 5d9c5a23474b9a9464e75cadf3e872042fa9097e /conf/cf-lex.l | |
parent | 324252975004154cc70623c94f05083bff100209 (diff) |
Filter: Fix handling of variables in anonymous filters
Define scope for anonymous filters, and also explicitly distinguish block
scopes and function/filter scopes instead of using anonymous / named
distinction.
Anonymous filters forgot to push scope, so variables for them were in
fact defined in the top scope and therefore they shared a frame. This got
broken after rework of variables, which assumed that there is a named
scope for every function/filter.
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r-- | conf/cf-lex.l | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index d6f46223..28d9ba50 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -812,7 +812,7 @@ cf_push_soft_scope(void) if (conf_this_scope->soft_scopes < 0xfe) conf_this_scope->soft_scopes++; else - cf_push_scope(NULL); + cf_push_block_scope(); } /** @@ -826,7 +826,7 @@ cf_pop_soft_scope(void) if (conf_this_scope->soft_scopes) conf_this_scope->soft_scopes--; else - cf_pop_scope(); + cf_pop_block_scope(); } /** @@ -841,7 +841,7 @@ cf_swap_soft_scope(void) if (conf_this_scope->soft_scopes) { conf_this_scope->soft_scopes--; - cf_push_scope(NULL); + cf_push_block_scope(); } } |