[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Passing Glists to callbacks
- From: Adam <adam ajtee plus com>
- To: Tristan Van Berkom <tvb gnome org>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: Passing Glists to callbacks
- Date: Mon, 5 Dec 2005 21:43:28 +0000
On Monday 05 December 2005 21:20, you wrote:
> Adam wrote:
> > Hi all,
>
> [...]
>
> > Any suggestions are of value.
>
> Hi,
> Its hard to make out what exactly it is your doing...
> it would be helpfull if you posted a short example
> of code that doesn't work.
>
> A common mistake when passing lists in as arguments to
> a callback *that modifies the list* is when people pass
> in the head node itself instead of its address, since
> you almost always want to re-assign the head node after
> any list operations.
>
I've resolved the issue I was taking the pointer to the first element of the
list when I was traversing the list. In the sample code it should be tmp
instead of instruments in the inner for loop.
Thanks
Adam
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]