[rhythmbox/wip/hadess/cleanups: 34/49] android: Use G_DECLARE_FINAL_TYPE()




commit 793a7a08e6ae01a60b50ff91780fa12e269fa5ba
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 3 13:57:33 2021 +0100

    android: Use G_DECLARE_FINAL_TYPE()

 plugins/android/rb-android-plugin.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plugins/android/rb-android-plugin.c b/plugins/android/rb-android-plugin.c
index 642da06e0..cfb1f5f58 100644
--- a/plugins/android/rb-android-plugin.c
+++ b/plugins/android/rb-android-plugin.c
@@ -54,23 +54,19 @@
 
 
 #define RB_TYPE_ANDROID_PLUGIN         (rb_android_plugin_get_type ())
-#define RB_ANDROID_PLUGIN(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_ANDROID_PLUGIN, 
RBAndroidPlugin))
-#define RB_ANDROID_PLUGIN_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_ANDROID_PLUGIN, 
RBAndroidPluginClass))
-#define RB_IS_ANDROID_PLUGIN(o)                (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_ANDROID_PLUGIN))
-#define RB_IS_ANDROID_PLUGIN_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_ANDROID_PLUGIN))
-#define RB_ANDROID_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_ANDROID_PLUGIN, 
RBAndroidPluginClass))
+G_DECLARE_FINAL_TYPE (RBAndroidPlugin, rb_android_plugin, RB, ANDROID_PLUGIN, PeasExtensionBase)
 
-typedef struct
+struct _RBAndroidPlugin
 {
        PeasExtensionBase parent;
 
        GList *sources;
-} RBAndroidPlugin;
+};
 
-typedef struct
+struct _RBAndroidPluginClass
 {
        PeasExtensionBaseClass parent_class;
-} RBAndroidPluginClass;
+};
 
 
 G_MODULE_EXPORT void peas_register_types (PeasObjectModule  *module);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]