Re: double linked list question.
- From: Paul Barton-Davis <pbd Op Net>
- To: Elias Athanasopoulos <eatha cc uoa gr>
- Cc: gtk-list gnome org, gtk-app-devel-list gnome org
- Subject: Re: double linked list question.
- Date: Thu, 21 Dec 2000 19:01:19 -0500
Is there a known problem when removing the first element of a double
linked list (GList)? I am facing a core dump, when I loop the
list (after I have removed the first element), something that is not
happening if I remove the nth element (n != 1).
i think you can assume that there are no such problems GList is such a
fundamental data type in glib and GTK that any such problems would
show themselves all over the place.
did you do the reassignment of the list pointer after the removal ?
eg.
GList *list;
list = g_list_append (list, some_ptr);
list = g_list_append (list, some_other_ptr);
g_list_remove (list, some_ptr);
/* oops. should have been :
list = g_list_remove (list, some_ptr);
*/
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]