On Tue, Mar 12, 2013 at 05:27:35PM +0100, Heiko Voigt wrote:
> > Would a union be more appropriate here? We do not ever have to pass it
> > directly as a parameter, since we pass the "struct config_source" to the
> > method functions.
> > It's still possible to screw up using a union, but it's slightly harder
> > than screwing up using a void pointer. And I do not think we need the
> > run-time flexibility offered by the void pointer in this case.
> No we do not need the void pointer flexibility. But that means every new
> source would need to add to this union. Junio complained about that fact
> when I first added the extra members directly to the struct. A union
> does not waste that much space and we get some seperation using the
> union members. Since this struct is local only I think that should be
Right. I think that is not a big deal, as we are not exposing this
struct outside of the config.c; any additions would need to add a new
git_config_from_foo function, anyway.
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