[pacman-dev] alpm_list_remove_dups: was - [PATCH] Sort and avoid duplicates in -Sii output

Nagy Gabor ngaba at bibl.u-szeged.hu
Wed Mar 24 19:43:11 CET 2010


> I was going to use alpm_list_remove_dups instead of testing for a
> strings presence before adding it but I find that function quite
> impractical...
>
> I wonder if any other frontend is using it and whether we could change
> it to actually removing the duplicates from a list.  i.e. return the
> same list with duplicates removed and their data freed.  Or am I
> missing some usage case where the current functionality is useful?
>
> Allan

Just a sidenote: remove_dup could be done in O(n) time, when the list  
is sorted. :-)

------------------------------------------------------
SZTE Egyetemi Konyvtar - http://www.bibl.u-szeged.hu
This message was sent using IMP: http://horde.org/imp/




More information about the pacman-dev mailing list