diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-02 11:02:14 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2014-10-02 12:52:50 +0200 |
commit | b2f008378a39104152b20a969942cd6c99644984 (patch) | |
tree | c3b502cb6e4dbeb33f1082037c4c24635dbdd1f6 /conf | |
parent | 0479b44373892db273f3e0365c7cbaad2eeb0d5f (diff) |
Allows more constants in set literals.
Thanks to Michael Fincham for the bugreport.
Diffstat (limited to 'conf')
-rw-r--r-- | conf/cf-lex.l | 2 | ||||
-rw-r--r-- | conf/conf.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 99785057..35b590bb 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -646,7 +646,7 @@ cf_walk_symbols(struct config *cf, struct symbol *sym, int *pos) char * cf_symbol_class_name(struct symbol *sym) { - if ((sym->class & 0xff00) == SYM_CONSTANT) + if (cf_symbol_is_constant(sym)) return "constant"; switch (sym->class) diff --git a/conf/conf.h b/conf/conf.h index fa14d7b5..799873d2 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -149,6 +149,10 @@ void cf_pop_scope(void); struct symbol *cf_walk_symbols(struct config *cf, struct symbol *sym, int *pos); char *cf_symbol_class_name(struct symbol *sym); +static inline int cf_symbol_is_constant(struct symbol *sym) +{ return (sym->class & 0xff00) == SYM_CONSTANT; } + + /* Parser */ int cf_parse(void); |