Re: g_list_foreach w/o user_data
- From: Owen Taylor <otaylor redhat com>
- To: Daniel Elstner <daniel elstner gmx net>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: g_list_foreach w/o user_data
- Date: 26 Oct 2001 14:35:17 -0400
Daniel Elstner <daniel elstner gmx net> writes:
> Hi,
>
> I just saw this piece of code in GTK+ 1.3:
>
> g_list_foreach (info->icon_list,
> (GFunc) g_object_unref, NULL);
>
>
> This casts a 1-arg-function pointer to a 2-arg-function pointer.
> Doesn't that depend heavily on the compiler's function call model?
> How portable is it, actually?
Very, though ANSI C doesn't guarantee it. GTK+ depends on it all over
the place.
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]