All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Sixt <j.sixt@viscovery.net>,
	Jay Soffian <jaysoffian@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: t5505-remote fails on Windows
Date: Fri, 20 Mar 2009 00:15:50 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.1.00.0903200014370.10279@pacific.mpi-cbg.de> (raw)
In-Reply-To: <20090319200308.GB17028@coredump.intra.peff.net>

Hi,

On Thu, 19 Mar 2009, Jeff King wrote:

> On Thu, Mar 19, 2009 at 04:02:19AM -0700, Junio C Hamano wrote:
> 
> > > Do we really want an API for that?  Calling qsort() directly should be 
> > > obvious enough, no?
> > 
> > I think so.  If it were done like this (notice the lack of double
> > indirection in the cmp_fn signature):
> > 
> >     typedef int string_list_item_cmp_fn(const struct string_list_item *, const struct string_list_item *);
> > 
> >     void sort_string_list_with_fn(struct string_list *list, string_list_item_cmp_fn *);
> > 
> > it would have made more sense, though.
> 
> IIRC, that is actually not valid C according to the standard (that is, 
> even though a void* can be implicitly assigned to any other pointer, a 
> function taking a void* and a function taking another pointer do not 
> necessarily have the same function signature or calling conventions). 
> Which is why cmp_items in string-list.c already does the indirection.

AFAICT the idea was not to pass the function to qsort() directly, but I 
have to agree that I do not see how that should be possible with the 
current interface of qsort();

Ciao,
Dscho

  reply	other threads:[~2009-03-19 23:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 11:42 t5505-remote fails on Windows Johannes Sixt
2009-03-19  4:18 ` Jeff King
2009-03-19  4:43   ` Jeff King
2009-03-19  4:56     ` Jay Soffian
2009-03-19  5:03       ` Jeff King
2009-03-19  7:20     ` Johannes Sixt
2009-03-19 20:04       ` Jeff King
2009-03-19 10:36     ` Johannes Schindelin
2009-03-19 11:02       ` Junio C Hamano
2009-03-19 15:00         ` Jay Soffian
2009-03-19 20:03         ` Jeff King
2009-03-19 23:15           ` Johannes Schindelin [this message]
2009-03-22  8:59           ` [PATCH] remote: improve sorting of "configure for git push" list Jeff King
2009-03-22 14:47             ` Jay Soffian
2009-03-22 21:58               ` Junio C Hamano
2009-03-23  7:56             ` Johannes Sixt
2009-03-23  8:09               ` Junio C Hamano
2009-03-19 19:52       ` t5505-remote fails on Windows Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0903200014370.10279@pacific.mpi-cbg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=jaysoffian@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.