Re: GList empty after iteration?
- From: Bernhard Schuster <schuster bernhard googlemail com>
- To: Craig <craigbakalian verizon net>
- Cc: Florian MÃllner <fmuellner gnome org>, gtk-app-devel-list gnome org
- Subject: Re: GList empty after iteration?
- Date: Tue, 13 Sep 2011 00:39:27 +0200
2011/9/12 Craig <craigbakalian verizon net>:
On Mon, 2011-09-12 at 22:20 +0200, Florian MÃllner wrote:
You are modifying the list in the loop until g_list_next() returns
NULL ...
Right. ÂI understand this now. ÂHowever, I thought using g_list_first()
would set GList *events back to the first object. ÂBut, as you state,
the darn thing is pointing to NULL, so getting the first object of NULL
is problematic.
Thanks for helping me hack through this. ÂI have created a solution.
You should re-check your understanding of GList. GList itself is a
container, one chunk of a list. You identify a list by either NULL
(an empty list) or by its first item (in theory you could by any item,
but in practice you either use the first or the last).
If you still got questions beyond the docs feel free to ask.
Regards
Bernhard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]