Re: [gtk-list] g_slist_foreach
- From: Elliot Lee <sopwith redhat com>
- To: Sascha Ziemann <szi aibon ping de>
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] g_slist_foreach
- Date: Thu, 3 Sep 1998 07:32:06 -0400 (EDT)
On 2 Sep 1998, Sascha Ziemann wrote:
> This definition of g_slist_foreach is not able to report errors during
> execution of the user function.
It's not meant to... It's meant to run a function on all the elements in a
list - if you need to do 'failout on error' use a for loop:
GSList *curent;
for(curent = alist; curent; curent = g_slist_next(curent)) {
if(error) break;
/* Do stuff */
}
There's nothing magical about what g_*list_foreach() does that can't be
reproduced in a couple of lines of code ;-)
-- Elliot
Progress (n.): The process through which Usenet has evolved from smart
people in front of dumb terminals to dumb people in front of smart
terminals. -- obs@burnout.demon.co.uk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]