[gtk-list] g_[s]list_qsort suggestion




  Oops, I've made a big mistake :

g_list_qsort( GList *list, GQSortFunc func) {
    GList *item;
    GList **tmp;
    gpointer *base;
    guint size;

    g_return_val_if_fail( list != NULL, FALSE);
    g_return_val_if_fail( func != NULL, FALSE);

    size = g_list_length( list);

    base = g_malloc( (2+size)*sizeof( GList*));
    ...

would be better.



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