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

Re: double linked glists



>    is the correct behavior of these lists to stop traversing when
>  they reach their limit ?  I mean if I'm going forward through my
>  list and I reach my last entry, I should then be able to prev back
>  to the front, right ?  well, mine aren't doing that.  they stop
>  going any direction.

It is up to your application how it decides to use GLists.  The
functions in glib assume non-circular lists; for example,
g_list_length() will loop infinitely if you pass it a list with loops.

This does not forbid you from being careful about how links are
assembled; you can very well have circular lists by using GList
structures.

  Federico



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