diff options
author | Jan Maria Matejka <mq@ucw.cz> | 2018-12-17 13:51:11 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-02-20 22:30:54 +0100 |
commit | 7afa1438866fa94454ba133608b6877171f71d37 (patch) | |
tree | bcf0fb0cfed9ff191fe3e07c28f3a8d87a78760c /conf/confbase.Y | |
parent | f62a369fb48be066560d6e8f0df82eef9c464ef0 (diff) |
Filter refactoring: Passing the resulting struct f_val as a pointer.
This also drops the multiplexing of errors with the f_val itself
together with the T_RETURN f_val type flag.
Diffstat (limited to 'conf/confbase.Y')
-rw-r--r-- | conf/confbase.Y | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y index 3fd034db..3d573e10 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -124,8 +124,7 @@ conf: definition ; definition: DEFINE SYM '=' term ';' { struct f_val *val = cfg_alloc(sizeof(struct f_val)); - *val = f_eval($4, cfg_mem); - if (val->type == T_RETURN) cf_error("Runtime error"); + if (f_eval($4, cfg_mem, val) > F_RETURN) cf_error("Runtime error"); cf_define_symbol($2, SYM_CONSTANT | val->type, val); } ; |