Brandon Williams <bmw...@google.com> writes:

> +     if (flags)
> +             rev.diffopt.flags = diff_flags_or(&rev.diffopt.flags, flags);

If we are avoiding from passing a struct (even if it is a small one)
by value, then returning a struct as value defeats the point of the
exercise, I would think.  If that will be the calling cconvention,
making diff_flags_or(&a, &b) to update &a by or'ing bits in &b would
be more natural.

Having said that, as I said in a separate message, as long as we
have this _or() thing, no sane person would add anything but
bitfields to the structure which will guarantee that it will stay to
be small set of flags and nothing else---so I personally am fine
with pass by value (which in turn makes it OK to return as a value,
too).

Other than that, this step looked reasonable to me.

Thanks.

Reply via email to