diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-15 14:51:53 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-15 14:51:53 +0200 |
commit | 384cf4702406a69825190ce0e28cfbcd1e3ccb8e (patch) | |
tree | ed3ea5488e668256f61d9cb65283d40cd471868a /grammar/rainerscript.h | |
parent | 03a21b56f237fa33198c3124ea66e3cfd7848552 (diff) | |
download | rsyslog-384cf4702406a69825190ce0e28cfbcd1e3ccb8e.tar.gz rsyslog-384cf4702406a69825190ce0e28cfbcd1e3ccb8e.tar.xz rsyslog-384cf4702406a69825190ce0e28cfbcd1e3ccb8e.zip |
renamed exprret type to var in spite of more generic use
Diffstat (limited to 'grammar/rainerscript.h')
-rw-r--r-- | grammar/rainerscript.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/grammar/rainerscript.h b/grammar/rainerscript.h index 62c2aa50..3129ed25 100644 --- a/grammar/rainerscript.h +++ b/grammar/rainerscript.h @@ -156,8 +156,14 @@ struct x { }; */ -/* the return value of an expresion evaluation */ -struct exprret { +/* a variant type, for example used for expression evaluation + * 2011-07-15/rger: note that there exists a "legacy" object var_t, + * which implements the same idea, but in a suboptimal manner. I have + * stipped this down as much as possible, but will keep it for a while + * to avoid unnecessary complexity during development. TODO: in the long + * term, var_t shall be replaced by struct var. + */ +struct var { union { es_str_t *estr; long long n; @@ -181,7 +187,7 @@ struct cnfactlst* cnfactlstAddSysline(struct cnfactlst* actlst, char *line); struct cnfactlst* cnfactlstReverse(struct cnfactlst *actlst); struct cnfexpr* cnfexprNew(unsigned nodetype, struct cnfexpr *l, struct cnfexpr *r); void cnfexprPrint(struct cnfexpr *expr, int indent); -void cnfexprEval(struct cnfexpr *expr, struct exprret *ret, void *pusr); +void cnfexprEval(struct cnfexpr *expr, struct var *ret, void *pusr); int cnfexprEvalBool(struct cnfexpr *expr, void *usrptr); struct cnfnumval* cnfnumvalNew(long long val); struct cnfstringval* cnfstringvalNew(es_str_t *estr); |