From 118265fb976cc14240a366ff820e9960bf4e056c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 1 Jul 2026 18:16:00 +0100 Subject: [PATCH] gdbusactiongroup: Declare using G_DECLARE_FINAL_TYPE `GDBusActionGroupClass` was never publicly declared, so the macros referencing it would never have worked. Clean that up by moving it all to `G_DECLARE_FINAL_TYPE`, which postdates when this code was originally written, but which achieves the same job. Signed-off-by: Philip Withnall Fixes: #3986 --- gio/gdbusactiongroup.c | 2 -- gio/gdbusactiongroup.h | 15 ++------------- gio/gio-autocleanups.h | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c index 19bd5e0d4..a540efca8 100644 --- a/gio/gdbusactiongroup.c +++ b/gio/gdbusactiongroup.c @@ -65,8 +65,6 @@ struct _GDBusActionGroup gboolean strict; }; -typedef GObjectClass GDBusActionGroupClass; - typedef struct { gchar *name; diff --git a/gio/gdbusactiongroup.h b/gio/gdbusactiongroup.h index f35f1c514..b4a17de1f 100644 --- a/gio/gdbusactiongroup.h +++ b/gio/gdbusactiongroup.h @@ -31,20 +31,9 @@ G_BEGIN_DECLS -#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ()) -#define G_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ - G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroup)) -#define G_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ - G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) -#define G_IS_DBUS_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ - G_TYPE_DBUS_ACTION_GROUP)) -#define G_IS_DBUS_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ - G_TYPE_DBUS_ACTION_GROUP)) -#define G_DBUS_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \ - G_TYPE_DBUS_ACTION_GROUP, GDBusActionGroupClass)) - +#define G_TYPE_DBUS_ACTION_GROUP (g_dbus_action_group_get_type ()) GIO_AVAILABLE_IN_ALL -GType g_dbus_action_group_get_type (void); +G_DECLARE_FINAL_TYPE (GDBusActionGroup, g_dbus_action_group, G, DBUS_ACTION_GROUP, GObject) GIO_AVAILABLE_IN_2_32 GDBusActionGroup * g_dbus_action_group_get (GDBusConnection *connection, diff --git a/gio/gio-autocleanups.h b/gio/gio-autocleanups.h index 4c57b4ec0..49c94f68d 100644 --- a/gio/gio-autocleanups.h +++ b/gio/gio-autocleanups.h @@ -46,7 +46,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCredentials, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDatagramBased, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataInputStream, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDataOutputStream, g_object_unref) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusActionGroup, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusAuthObserver, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusConnection, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GDBusInterface, g_object_unref)