On Mon, Dec 9, 2013 at 1:06 PM, Junio C Hamano <gits...@pobox.com> wrote:
> I thought we cast without SP after the (typename), i.e.
> gpointer *data = (gpointer *)user_data;
I've found a mixture of both in the code base, and the
CodingGuidelines doesn't say either way. I'm happy to switch the file
to no SP after the typename if that's the project preference.
> It could be argued that a cast that turns a "void *" to a pointer to
> another type can go, as Felipe noted, but I think that is better
> done in a separate patch, perhaps as a follow-up to this "small
> stylistic clean-ups".
> I said "it could be argued" above, because I am on the fence on that
> change. If this were not using a type "gpointer", whose point is to
> hide what the actual implementation of that type is, but a plain
> vanilla "void *", then I would not have any doubt. But it feels
> wrong to look behind that deliberate "gpointer" abstraction and take
> advantage of the knowledge that it happens to be implemented as
> "void *" (and if we do not start from that knowledge, losing the
> cast is a wrong change).
To be honest, I'm on the fence myself. Let's just leave the original
patch queued, and if the no SP is preferable, I can do that as a
PS Sorry about the repeat message Junio. I forgot to CC the list.
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