mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
Merge commit '6b95353e' into thread-next
This commit is contained in:
commit
d6d122e245
@ -570,6 +570,9 @@ static inline void cf_swap_soft_scope(struct config *conf);
|
|||||||
static struct symbol *
|
static struct symbol *
|
||||||
cf_new_symbol(struct sym_scope *scope, pool *p, struct linpool *lp, const byte *c)
|
cf_new_symbol(struct sym_scope *scope, pool *p, struct linpool *lp, const byte *c)
|
||||||
{
|
{
|
||||||
|
if (scope->readonly)
|
||||||
|
cf_error("Unknown symbol %s", c);
|
||||||
|
|
||||||
struct symbol *s;
|
struct symbol *s;
|
||||||
|
|
||||||
uint l = strlen(c);
|
uint l = strlen(c);
|
||||||
@ -771,6 +774,9 @@ cf_lex_init(int is_cli, struct config *c)
|
|||||||
s->class = SYM_KEYWORD;
|
s->class = SYM_KEYWORD;
|
||||||
s->keyword = k;
|
s->keyword = k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global_root_scope.readonly = 1;
|
||||||
|
global_filter_scope.readonly = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ifs_head = ifs = push_ifs(NULL);
|
ifs_head = ifs = push_ifs(NULL);
|
||||||
|
@ -141,9 +141,10 @@ struct sym_scope {
|
|||||||
HASH(struct symbol) hash; /* Local symbol hash */
|
HASH(struct symbol) hash; /* Local symbol hash */
|
||||||
|
|
||||||
uint slots; /* Variable slots */
|
uint slots; /* Variable slots */
|
||||||
byte active; /* Currently entered */
|
|
||||||
byte block; /* No independent stack frame */
|
|
||||||
byte soft_scopes; /* Number of soft scopes above */
|
byte soft_scopes; /* Number of soft scopes above */
|
||||||
|
byte active:1; /* Currently entered */
|
||||||
|
byte block:1; /* No independent stack frame */
|
||||||
|
byte readonly:1; /* Do not add new symbols */
|
||||||
};
|
};
|
||||||
|
|
||||||
void cf_enter_filters(void);
|
void cf_enter_filters(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user