]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-var-expand: Change var_expand_parameter_value to struct
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 23 Mar 2026 10:10:30 +0000 (12:10 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 23 Mar 2026 13:40:28 +0000 (15:40 +0200)
src/lib-var-expand/expansion.h
src/lib-var-expand/var-expand-parser.y

index b5791744371cbb13587f4f8ae611881ef824f70a..2d8a3d4d0fa088c9e9ebf21a1aab05847a211b20 100644 (file)
@@ -8,7 +8,7 @@ enum var_expand_parameter_value_type {
        VAR_EXPAND_PARAMETER_VALUE_TYPE_COUNT
 };
 
-union var_expand_parameter_value {
+struct var_expand_parameter_value {
        const char *str;
        intmax_t num;
 };
@@ -18,7 +18,7 @@ struct var_expand_parameter {
        const char *key;
        int idx;
        enum var_expand_parameter_value_type value_type;
-       union var_expand_parameter_value value;
+       struct var_expand_parameter_value value;
 };
 
 struct var_expand_filter {
index d06e469763b9a91ca87b07a336b3e79d96ff0a32..fc479bd5d04f1c3a5a82b0bdb9d4fe7d8d65c7bd 100644 (file)
@@ -166,7 +166,7 @@ link_argument(VAR_EXPAND_PARSER_STYPE *state, struct var_expand_parameter *par)
 static void
 push_named_argument(VAR_EXPAND_PARSER_STYPE *state, const char *name,
                    enum var_expand_parameter_value_type type,
-                   const union var_expand_parameter_value *value)
+                   const struct var_expand_parameter_value *value)
 {
        struct var_expand_parameter *par =
                p_new(state->plist->pool, struct var_expand_parameter, 1);
@@ -185,7 +185,7 @@ push_named_argument(VAR_EXPAND_PARSER_STYPE *state, const char *name,
 static void
 push_argument(VAR_EXPAND_PARSER_STYPE *state,
              enum var_expand_parameter_value_type type,
-             const union var_expand_parameter_value *value)
+             const struct var_expand_parameter_value *value)
 {
        struct var_expand_parameter *par =
                p_new(state->plist->pool, struct var_expand_parameter, 1);
@@ -253,7 +253,7 @@ static void push_new_program(VAR_EXPAND_PARSER_STYPE *pstate)
 static void create_literal(VAR_EXPAND_PARSER_STYPE *pstate,
                           const char *value)
 {
-       union var_expand_parameter_value ep_value = {
+       struct var_expand_parameter_value ep_value = {
                .str = value
        };
        if (pstate->pp != NULL && pstate->pp->only_literal) {
@@ -269,7 +269,7 @@ static void create_literal(VAR_EXPAND_PARSER_STYPE *pstate,
        pstate->p->only_literal = TRUE;
 }
 
-static union var_expand_parameter_value tmp_value;
+static struct var_expand_parameter_value tmp_value;
 
 %}