On Wed, 2009-09-02 at 19:17 +0100, Richard Hughes wrote:
> In PackageKit, I have to explicitly cast in my finish function:
> 
> static void
> pk_package_sack_merge_state_finish (PkPackageSackState *state, const
> GError *error)
> {
> ...
>               g_simple_async_result_set_from_error (state->res, (GError*) 
> error);
> ...
> }
> 
> The finish function is passed a const GError (as the error can't be
> freed), hence the cast is required for the compiler not to warn.
> 
> Of course, the correct thing to do would be to trivially fix gio, and
> a patch is attached that does exactly that. Okay to commit?

Mmmm, wouldn't this break the API? E.g. cause compilation of existing
apps to spew warnings. If so, we can't do it.

Unfortunately there's a lot of const incorrectness in the GLib and GTK+
stack - maybe we should fix this in GLib3/GTK3 since it's going to be a
new ABI.

      David


_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to