g_list_foreach w/o user_data



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?

I'm sorry if this has been discussed before.

Regards,
--Daniel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]