How about comparing two strings with equality operator. I saw in GNOME glib
library also. They compare two strings with ==
operator. Here is the code:
/* Code from Singly Linked List - gslist.c*/
GSList*
g_slist_find (GSList *list,
gconstpointer data) // Here gconstpointer is `const void*`
{
while (list)
{
if (list->data == data) // What is compare here?
break;
list = list->next;
}
return list;
}
So, Is glib code works or not always?