Karthik Nayak <karthik....@gmail.com> writes:

> Ensure that each 'atom_value' has a reference to its corresponding
> 'used_atom'. This let's us use values within 'used_atom' in the
> 'handler' function.
>
> Hence we can get the %(align) atom's parameters directly from the
> 'used_atom' therefore removing the necessity of passing %(align) atom's
> parameters to 'atom_value'.
>
> This also acts as a preparatory patch for the upcoming patch where we
> introduce %(if:equals=) and %(if:notequals=).
>
> Signed-off-by: Karthik Nayak <karthik....@gmail.com>
> ---
>  ref-filter.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/ref-filter.c b/ref-filter.c
> index 41e73f0..12e646c 100644
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -230,11 +230,9 @@ struct ref_formatting_state {
>  
>  struct atom_value {
>       const char *s;
> -     union {
> -             struct align align;
> -     } u;
>       void (*handler)(struct atom_value *atomv, struct ref_formatting_state 
> *state);
>       unsigned long ul; /* used for sorting when not FIELD_STR */
> +     struct used_atom *atom;
>  };

Makes sense, as this would make what 04/16 does clearer.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to