New PurplePrefType: string with hint list

Mark Doliner mark at kingant.net
Sat Aug 11 17:52:48 EDT 2012


On Fri, Aug 10, 2012 at 6:40 PM, Ethan Blanton <elb at pidgin.im> wrote:
> Any other opinions?

I like this, too.  Can I suggest using a GSList for the hints?  We
rarely (never?) use the capabilities of doubly linked lists, and
singly linked lists are slightly smaller.  It probably doesn't matter
here, but I think it's a good idea in general.  I noticed that you use
g_list_free_full(), which was added in glib 2.28.  Note that our
configure.ac currently allows glib versions as far back as 2.16.0.  We
usually do one of the following:
while (list != NULL) {
    g_free(list->data);
    list = g_slist_delete_link(list, list);
}

or:
g_slist_foreach(list, (GFunc)g_free, NULL);
g_slist_free(list);




More information about the Devel mailing list