>--[Raphael Manfredi]--<[EMAIL PROTECTED]>

> :I always thought Gnucleus was buggy till I was looking closer at Gtk-Gnutella...
> :... whose code tends to do stupid stuff like building up a temporary single
> :linked list by always _APPENDING_ new items (O (n?) anyone?).
> There are several places where this is done yes.  But glib's lists are
> so basic that it's sometimes a pain.  We need a wrapping structure to
> at least remember the head/tail of the list to make appending to a single
> list an O(1) operation: there are some places where unfortunately appending
> is necessary to keep the ordering...

You may want to look into Glib2 (and implement functions missing in
Glib1.2...).

And no, you don't always need the same order, but g_slist_append() is still
used too often. And if you use the resulting list only once, you can reverse
it.

-- 
         100 DM =  51  � 13 �.
         100  � = 195 DM 58 pf.
  mailto:[EMAIL PROTECTED]
    http://www.ruediger-kuhlmann.de/


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to