GNOME Bugzilla – Bug 164271
Searching in the list with asymmetric function
Last modified: 2005-01-17 03:43:26 UTC
This bug has been opened here: http://bugs.debian.org/207042 "For g_list_find_custom() and g_slist_find_custom() it is not documented whether "func" is called with "data" as first or as second argument (and with the other argument of "func" being a value from "list"). Please document it. It matters for asymmetric comparison functions like the following: #inlcude <sys/stat.h> static gint greek_word_clicked_morph_compare(gconstpointer a, gconstpointer b) { int x = (struct stat*)a->st_atime; int y = (struct stat*)b->st_mtime; if(x == y) return 0; return x > y ? 1 : -1; } Note asymmetry: "atime" for the left arg, but "mtime" for the right one."
I'm not sure what you are missing, the docs say: The function takes two #gconstpointer arguments, the #GList element's data and the given user data