Re: [RFC 1/3] Alternates API: Untangle the interface
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2011, 22:28 UTC
- Message-ID
- <7v1v1omeec.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <5ed7886ec5e12c8e3a5f45d19625a4f5d2cdd38a.1301521243.git.mfwitten@gmail.com>
Michael Witten <mfwitten@gmail.com> writes:
Show 11 quoted lines
> diff --git a/transport.c b/transport.c
> index a02f79a..c61723f 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -1190,14 +1190,13 @@ literal_copy:
> return xstrdup(url);
> }
>
> -int refs_from_alternate_cb(struct alternate_object_database *e, void *cb)
> +int refs_from_alternate_cb(struct alternate_object_database *e, alternate_ref_fn ref_fn)
> {Adding an extra "fn" is Ok, but I'd rather not to see removal of generic callback data pointer if the _only_ reason you are doing so is "currently nobody uses it".
Besides, I see "a function pointer and a data pointer cannot be held in a single variable" as an academic mental mastu^wexercise that is useless in real life. Are there real platforms that matter where (void *) cannot hold a pointer to a function?