On Sat, Sep 26, 2009 at 10:26:41AM +0100, Magnus Therning wrote: > What function should I use to sort a list of strings to avoid the > compiler warning I get with strcmp: > > ... > my_list.sort( strcmp ); > ... > > Test.vala:60: warning: passing argument 2 of ‘g_list_sort’ from > incompatible pointer type > /usr/include/glib-2.0/glib/glist.h:101: note: expected > ‘GCompareFunc’ but argument is of type ‘int (*)(const char *, const > char *)’ > GLib.strcmp() seems right to me. Vala should probably cast it to GCompareFunc in the C code.
-- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
signature.asc
Description: Digital signature
_______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
