Re: g_list behavior: what am I doing wrong?

2005-07-19 Thread Christopher Anderson
Ah, I see. Thanks for showing that pitfall, I could easily have done the same thing. Cheers, Chris Anderson On 7/14/05, Allin Cottrell [EMAIL PROTECTED] wrote: On Thu, 14 Jul 2005, Christopher Anderson wrote: I am curious, could you explain your solution? OK, at the cost of some

g_list behavior: what am I doing wrong?

2005-07-14 Thread Allin Cottrell
This must be something simple, but what am I doing wrong with g_list_prepend() below? It seems to have the effect of erasing the original list and replacing it with a singleton element. #include glib.h int main (void) { GList *list = NULL; list = g_list_append(list, foo); list =

Re: g_list behavior: what am I doing wrong?

2005-07-14 Thread Christopher Anderson
I am curious, could you explain your solution? Thanks, Chris Anderson On 7/14/05, Allin Cottrell [EMAIL PROTECTED] wrote: On Thu, 14 Jul 2005, Allin Cottrell wrote: This must be something simple... It was, sorry. Stupidity over what g_list_next() does. Allin Cottrell

Re: g_list behavior: what am I doing wrong?

2005-07-14 Thread Allin Cottrell
On Thu, 14 Jul 2005, Christopher Anderson wrote: I am curious, could you explain your solution? OK, at the cost of some embarrassment ;-) Quoting my test function: int main (void) { GList *list = NULL; list = g_list_append(list, foo); list = g_list_append(list, bar);