Re: Cautions with g_list_next()

2006-09-12 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Sep 13, 2006 at 08:18:53AM +0200, David Ne?as (Yeti) wrote: [...] > You have the misconception GList* have some internal state > and internal iterators... Thanks -- you made it even clearer than me. Regards - -- tomás -BEGIN PGP SIGNATURE

Re: Cautions with g_list_next()

2006-09-12 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Sep 13, 2006 at 02:51:22AM -0300, Fabricio Rocha wrote: > Hi, Yeti and Tom, > > Yes, sure, your explanation is quite right and logic, and I could find > out how to make things work after dealing with the ->next member > directly... [..

Re: Cautions with g_list_next()

2006-09-12 Thread Yeti
On Wed, Sep 13, 2006 at 02:51:22AM -0300, Fabricio Rocha wrote: > Hi, Yeti and Tom, > > Yes, sure, your explanation is quite right and logic, and I could find > out how to make things work after dealing with the ->next member > directly... but I see some kind of "mislogic" that leads to th

Re: Cautions with g_list_next()

2006-09-12 Thread Fabricio Rocha
Hi, Yeti and Tom, Yes, sure, your explanation is quite right and logic, and I could find out how to make things work after dealing with the ->next member directly... but I see some kind of "mislogic" that leads to this error (I think probably more people did the same mistake someday). T

Re: Cautions with g_list_next()

2006-09-11 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Sep 12, 2006 at 12:15:13AM -0300, Fabricio Rocha wrote: > Hi pals, > > Are there any known recomendations about GLists and the g_list_next() > macro? I found no remarks in the official documentation until I got > problems with construc

Re: Cautions with g_list_next()

2006-09-11 Thread Yeti
On Tue, Sep 12, 2006 at 12:15:13AM -0300, Fabricio Rocha wrote: > > element = g_list_first (member->names); > while (element) { > ... > element = g_list_next (member->names); > } > > ... which led the program to an infinite loop because "element

Cautions with g_list_next()

2006-09-11 Thread Fabricio Rocha
Hi pals, Are there any known recomendations about GLists and the g_list_next() macro? I found no remarks in the official documentation until I got problems with constructions like this... element = g_list_first (member->names); while (element) { ...