From b0776ddd1850f5ca91fe50c11311fe5c9c90cf53 Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Mon, 1 Feb 2016 14:24:46 +0100 Subject: [PATCH] registrybackend: use G_DECLARE_FINAL_TYPE --- gio/gregistrysettingsbackend.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c index f407aa624..62fe80a29 100644 --- a/gio/gregistrysettingsbackend.c +++ b/gio/gregistrysettingsbackend.c @@ -154,15 +154,9 @@ typedef struct HANDLE message_sent_event, message_received_event; } WatchThreadState; -#define G_TYPE_REGISTRY_BACKEND (g_registry_backend_get_type ()) -#define G_REGISTRY_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ - G_TYPE_REGISTRY_BACKEND, GRegistryBackend)) -#define G_IS_REGISTRY_BACKEND(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ - G_TYPE_REGISTRY_BACKEND)) +G_DECLARE_FINAL_TYPE (GRegistryBackend, g_registry_backend, G, REGISTRY_BACKEND, GSettingsBackend) -typedef GSettingsBackendClass GRegistryBackendClass; - -typedef struct { +struct _GRegistryBackend { GSettingsBackend parent_instance; char *base_path; @@ -173,7 +167,7 @@ typedef struct { GNode *cache_root; WatchThreadState *watch; -} GRegistryBackend; +}; G_DEFINE_TYPE_WITH_CODE (GRegistryBackend, g_registry_backend,