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) {
                ...
                element = g_list_next (member->names);
        }

        ... which led the program to an infinite loop because "element" would 
NOT acquire the 0x0 (NULL) value from "element->next" as expected. I 
could deduce that this is a problem concerning the macro nature and 
pre-processing of g_list_next, as the K&R "bible" book warns. The same 
construction seems to work fine if the iteration line is "element = 
g_list_next (element)" or "element = element->next". Have you ever had 
problems like this, or have I missed something?

Regards!

Fabricio Rocha
Brasilia, Brasil

        

        
                
_______________________________________________________ 
VocĂȘ quer respostas para suas perguntas? Ou vocĂȘ sabe muito e quer compartilhar 
seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to