
On Sun, 2003-12-07 at 19:34, Bryce Harrington wrote:
/home/bryce/src/Inkscape/inkscape/src/widgets/button.c: In function `void sp_button_toggle_set_down(SPButton*, int)': /home/bryce/src/Inkscape/inkscape/src/widgets/button.c:189: invalid conversion from `void (*)()' to `void*' /home/bryce/src/Inkscape/inkscape/src/widgets/button.c:191: invalid conversion from `void (*)()' to `void*'
Hmm, that's just not right.
Looking into this, it appears that GClosure actually uses a gpointer for the callback function.
GClosure * g_cclosure_new (GCallback callback_func, gpointer user_data, GClosureNotify destroy_data) { GClosure *closure;
g_return_val_if_fail (callback_func != NULL, NULL);
closure = g_closure_new_simple (sizeof (GCClosure), user_data); if (destroy_data) g_closure_add_finalize_notifier (closure, user_data, destroy_data); ((GCClosure *) closure)->callback = (gpointer) callback_func;
return closure; }
Apparently nobody ever ran lint on the GLib source.
One wonders what contortions they have to go through to get this to work on IA-64.
I guess for now we must cast to gpointer, but I guess the next question is how to deal with this upstream...
-mental