[gupnp-av] Make Feature and FeatureListParser final types



commit 23597361a32a50b95764c1e69aeb760bfa8269b0
Author: Jens Georg <mail jensge org>
Date:   Sun Jul 4 00:31:56 2021 +0200

    Make Feature and FeatureListParser final types
    
    It is not useful to ever derive from that

 libgupnp-av/gupnp-feature-list-parser.c |  4 ++++
 libgupnp-av/gupnp-feature-list-parser.h | 19 +++++++------------
 libgupnp-av/gupnp-feature.c             |  8 ++++++++
 libgupnp-av/gupnp-feature.h             | 11 ++---------
 4 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/libgupnp-av/gupnp-feature-list-parser.c b/libgupnp-av/gupnp-feature-list-parser.c
index 16e5ddd..16208b5 100644
--- a/libgupnp-av/gupnp-feature-list-parser.c
+++ b/libgupnp-av/gupnp-feature-list-parser.c
@@ -23,6 +23,10 @@
 #include "gupnp-av.h"
 #include "xml-util.h"
 
+struct _GUPnPFeatureListParser {
+        GObject parent;
+};
+
 /* GUPnPFeatureListParser */
 G_DEFINE_TYPE (GUPnPFeatureListParser,
                gupnp_feature_list_parser,
diff --git a/libgupnp-av/gupnp-feature-list-parser.h b/libgupnp-av/gupnp-feature-list-parser.h
index 08ca0d8..52edeb8 100644
--- a/libgupnp-av/gupnp-feature-list-parser.h
+++ b/libgupnp-av/gupnp-feature-list-parser.h
@@ -15,18 +15,13 @@
 
 G_BEGIN_DECLS
 
-G_DECLARE_DERIVABLE_TYPE(GUPnPFeatureListParser,
-                          gupnp_feature_list_parser,
-                          GUPNP,
-                          FEATURE_LIST_PARSER,
-                          GObject)
-
-#define GUPNP_TYPE_FEATURE_LIST_PARSER \
-                (gupnp_feature_list_parser_get_type ())
-
-struct _GUPnPFeatureListParserClass{
-        GObjectClass parent_class;
-};
+G_DECLARE_FINAL_TYPE (GUPnPFeatureListParser,
+                      gupnp_feature_list_parser,
+                      GUPNP,
+                      FEATURE_LIST_PARSER,
+                      GObject)
+
+#define GUPNP_TYPE_FEATURE_LIST_PARSER (gupnp_feature_list_parser_get_type ())
 
 GUPnPFeatureListParser *
 gupnp_feature_list_parser_new        (void);
diff --git a/libgupnp-av/gupnp-feature.c b/libgupnp-av/gupnp-feature.c
index ee12015..f904ce5 100644
--- a/libgupnp-av/gupnp-feature.c
+++ b/libgupnp-av/gupnp-feature.c
@@ -18,6 +18,10 @@
 
 #include "gupnp-feature.h"
 
+struct _GUPnPFeatureClass {
+        GObjectClass parent_class;
+};
+
 struct _GUPnPFeaturePrivate {
         char *name;
         char *version;
@@ -25,6 +29,10 @@ struct _GUPnPFeaturePrivate {
 };
 typedef struct _GUPnPFeaturePrivate GUPnPFeaturePrivate;
 
+struct _GUPnPFeature {
+        GObject parent;
+};
+
 G_DEFINE_TYPE_WITH_PRIVATE (GUPnPFeature,
                             gupnp_feature,
                             G_TYPE_OBJECT)
diff --git a/libgupnp-av/gupnp-feature.h b/libgupnp-av/gupnp-feature.h
index ffd486d..3126384 100644
--- a/libgupnp-av/gupnp-feature.h
+++ b/libgupnp-av/gupnp-feature.h
@@ -14,18 +14,11 @@
 
 G_BEGIN_DECLS
 
-G_DECLARE_DERIVABLE_TYPE(GUPnPFeature,
-                          gupnp_feature,
-                          GUPNP,
-                          FEATURE,
-                          GObject)
+typedef struct _GUPnPFeature GUPnPFeature;
+G_DECLARE_FINAL_TYPE (GUPnPFeature, gupnp_feature, GUPNP, FEATURE, GObject)
 
 #define GUPNP_TYPE_FEATURE (gupnp_feature_get_type ())
 
-struct _GUPnPFeatureClass {
-        GObjectClass parent_class;
-};
-
 const char *
 gupnp_feature_get_name       (GUPnPFeature *feature);
 


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