From e85da9c06af30426fa790111d0029259fc35ffe9 Mon Sep 17 00:00:00 2001
From: Bruce Cowan <bruce@bcowan.me.uk>
Date: Thu, 17 Nov 2022 22:22:17 +0000
Subject: [PATCH] Stop using gpointer

It's one of those silly g* typedefs
---
 src/main.c             | 10 +++++-----
 src/rugby-app-window.c | 10 +++++-----
 src/rugby-list-store.c | 12 ++++++------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/main.c b/src/main.c
index 03a2ea0..37347da 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,7 +10,7 @@
 
 static void
 on_activate (              GApplication *app,
-             G_GNUC_UNUSED gpointer      user_data)
+             G_GNUC_UNUSED void         *user_data)
 {
     g_assert (GTK_IS_APPLICATION (app));
 
@@ -27,7 +27,7 @@ on_activate (              GApplication *app,
 static void
 about_activated (G_GNUC_UNUSED GSimpleAction *simple,
                  G_GNUC_UNUSED GVariant      *parameter,
-                               gpointer       user_data)
+                               void          *user_data)
 {
     GtkApplication *app = GTK_APPLICATION (user_data);
     GtkWindow *window = gtk_application_get_active_window (app);
@@ -45,7 +45,7 @@ about_activated (G_GNUC_UNUSED GSimpleAction *simple,
 static void
 preferences_activated (G_GNUC_UNUSED GSimpleAction *simple,
                        G_GNUC_UNUSED GVariant      *parameter,
-                                     gpointer       user_data)
+                                     void          *user_data)
 {
     GtkApplication *app = GTK_APPLICATION (user_data);
     GtkWindow *window = gtk_application_get_active_window (app);
@@ -55,8 +55,8 @@ preferences_activated (G_GNUC_UNUSED GSimpleAction *simple,
 }
 
 static void
-on_startup (GApplication          *app,
-            G_GNUC_UNUSED gpointer user_data)
+on_startup (              GApplication *app,
+            G_GNUC_UNUSED void         *user_data)
 {
     const GActionEntry app_entries[] =
     {
diff --git a/src/rugby-app-window.c b/src/rugby-app-window.c
index fc77882..dd0ad44 100644
--- a/src/rugby-app-window.c
+++ b/src/rugby-app-window.c
@@ -96,7 +96,7 @@ item_tooltip_cb (GtkListItem *item)
 static void
 activate_score_changed (G_GNUC_UNUSED GSimpleAction *action,
                                       GVariant      *parameter,
-                                      gpointer       user_data)
+                                      void          *user_data)
 {
     RugbyAppWindow *self = RUGBY_APP_WINDOW (user_data);
 
@@ -113,7 +113,7 @@ activate_score_changed (G_GNUC_UNUSED GSimpleAction *action,
 
 static void
 try_spin_value_changed_cb (G_GNUC_UNUSED GtkSpinButton *btn,
-                                         gpointer       user_data)
+                                         void          *user_data)
 {
     RugbyAppWindow *self = RUGBY_APP_WINDOW (user_data);
     gtk_filter_changed (GTK_FILTER (self->try_filter), GTK_FILTER_CHANGE_DIFFERENT);
@@ -128,8 +128,8 @@ rugby_app_window_dispose (GObject *object)
 }
 
 static gboolean
-try_filter_func (gpointer item,
-                 gpointer user_data)
+try_filter_func (void *item,
+                 void *user_data)
 {
     RugbyPossibility *possibility = RUGBY_POSSIBILITY (item);
     RugbyAppWindow *self = RUGBY_APP_WINDOW (user_data);
@@ -150,7 +150,7 @@ try_filter_func (gpointer item,
 static void
 show_try_filter_change_state (GSimpleAction *action,
                               GVariant      *value,
-                              gpointer       user_data)
+                              void          *user_data)
 {
     RugbyAppWindow *self = RUGBY_APP_WINDOW (user_data);
 
diff --git a/src/rugby-list-store.c b/src/rugby-list-store.c
index f9c5299..6fe3590 100644
--- a/src/rugby-list-store.c
+++ b/src/rugby-list-store.c
@@ -37,18 +37,18 @@ static GParamSpec *properties[N_PROPS];
 // Helper functions
 
 static int
-sort_func (              gconstpointer a,
-                         gconstpointer b,
-           G_GNUC_UNUSED gpointer      user_data)
+sort_func (              gconstpointer  a,
+                         gconstpointer  b,
+           G_GNUC_UNUSED void          *user_data)
 {
     int atries, autries;
     int btries, butries;
 
-    g_object_get ((gpointer) a,
+    g_object_get ((void *) a,
                   "tries", &atries,
                   "utries", &autries,
                   NULL);
-    g_object_get ((gpointer) b,
+    g_object_get ((void *) b,
                   "tries", &btries,
                   "utries", &butries,
                   NULL);
@@ -124,7 +124,7 @@ rugby_list_store_get_n_items (GListModel *list)
     return g_list_model_get_n_items (G_LIST_MODEL (self->items));
 }
 
-static gpointer
+static void *
 rugby_list_store_get_item (GListModel *list,
                            unsigned    position)
 {
-- 
GitLab