Subject: Re: [PATCH] object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter

From: Junio C Hamano <[email-masked]>
Date: Sun, 07 Sep 2025 21:17:33 -0700

René Scharfe <[email-masked]> writes:

> I can see the appeal, even though (or because) it's kinda half a step
> back as it keeps the original local variable, in a better place.
>
> We could _lunge_ forward and add type checks to allow the compiler to
> tell us whether the pointers' journey through the void is safe.  The
> trick below is simple enough, but requires bespoke macros AFAICS.

Once there is even a single step of callback interface where the
callback parameter has to be a generic "void *", we have to cast
down to the concrete "struct min_abbrev_data *" either explicitly
or implicitly anyway, so it does not really make that much of a
difference (and that is why I said "we obviously do not have to").

Thanks.