diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-07-25 10:00:09 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2018-07-25 10:05:39 +0300 |
commit | 6adaf7c33d9a0d59b8b17bcd860957ef94a5c134 (patch) | |
tree | 0398d18e3c329f76f1a6d14ee3e688939d414b6d /gdk/wayland/gdkprimary-wayland.c | |
parent | 95a4eff6baddb174ef5ff8384250bd8c1e6e1f32 (diff) | |
download | gtk+-g-clear-pointer-propagate.tar.gz |
Remove GDestroyNotify casts in g_clear_pointer() usesg-clear-pointer-propagate
GLib master propagates argument types in g_clear_pointer(), which causes
the usual function pointer casts to GDestroyNotify to trip compiler
warnings. Additionally, this commit changes some cleanup functions where
appropriate (wl_data_source_destroy ->
gtk_primary_selection_source_destroy for struct
gtk_primary_selection_source).
Diffstat (limited to 'gdk/wayland/gdkprimary-wayland.c')
-rw-r--r-- | gdk/wayland/gdkprimary-wayland.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdk/wayland/gdkprimary-wayland.c b/gdk/wayland/gdkprimary-wayland.c index 62a6941db2..98f75edc1f 100644 --- a/gdk/wayland/gdkprimary-wayland.c +++ b/gdk/wayland/gdkprimary-wayland.c @@ -62,20 +62,20 @@ gdk_wayland_primary_discard_pending (GdkWaylandPrimary *cb) gdk_content_formats_unref (ignore); cb->pending_builder = NULL; } - g_clear_pointer (&cb->pending, (GDestroyNotify) gtk_primary_selection_offer_destroy); + g_clear_pointer (&cb->pending, gtk_primary_selection_offer_destroy); } static void gdk_wayland_primary_discard_offer (GdkWaylandPrimary *cb) { g_clear_pointer (&cb->offer_formats, gdk_content_formats_unref); - g_clear_pointer (&cb->offer, (GDestroyNotify) gtk_primary_selection_offer_destroy); + g_clear_pointer (&cb->offer, gtk_primary_selection_offer_destroy); } static void gdk_wayland_primary_discard_source (GdkWaylandPrimary *cb) { - g_clear_pointer (&cb->source, (GDestroyNotify) wl_data_source_destroy); + g_clear_pointer (&cb->source, gtk_primary_selection_source_destroy); } static void |