bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: comparison_fn_t


From: Bruno Haible
Subject: [bug-gnulib] Re: comparison_fn_t
Date: Fri, 27 May 2005 14:53:08 +0200
User-agent: KMail/1.5

Oskar Liljeblad wrote:
> >   extern void my_sort (void *, size_t, size_t,
> >                        int (*) (const void *, const void *));
>
> Sure, but assume you're passing strcmp for the comparison function,
> wouldn't you want to cast it to avoid the warning?

Yes, and there's nothing wrong with

   my_sort (..., ..., ..., (int (*) (const void *, const void *)) strcmp);

Everyone who likes can define his own typedef for this type. They will
not collide.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]