Re: Need Help using GLib -> GList



glisterry DeLisle wrote:
glist
[...]>
Can anyone give me some hints?

Hmmm,
    I think this is what they call "deja vu" ;-)

IIRC, the problem is that you are itterating through your
linked list using the list head, therefore losing the
list head after one cycle, also; I again insist that you
use `NULL' as the value of an empty hand, as opposed to:

ahand = g_new (GList, 1);
ahand->data = NULL;

which is not only an obscene way of using the GList api,
it will also crash on wild pointers: ahand->prev and ahand->next.

Note that it is completely normal for an empty list head pointer
value to be NULL.

Cheers,
                             -Tristan



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