On 5/2/05, Городничев  Денис <[EMAIL PROTECTED]> wrote:
> i think that the result of next code must be 3.
> but i have 0
> if uncomment "l=..." it's work correctly
> 
> #include <glib.h>
> 
> int main()
> {
>     GList* l=NULL;
> //    l=g_list_alloc();
> 
>     g_list_append(l,GINT_TO_POINTER(1));
>     g_list_append(l,GINT_TO_POINTER(1));
>     g_list_append(l,GINT_TO_POINTER(1));
> 
>     printf("%i",g_list_length(l));
> }

use:
l = g_list_append(l,GINT_TO_POINTER(1));

instead of:
g_list_append(l,GINT_TO_POINTER(1));

Vivien
_______________________________________________
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