[glib] gresolver: Mark GResolver as an abstract class



commit 10bac98185d98cfaba323c474167facebfbf8c73
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Sep 30 14:41:12 2016 +0200

    gresolver: Mark GResolver as an abstract class
    
    It only works through its virtual methods, so while it could be
    instantiated before (and this is technically an API break), any instance
    of it would previously have crashed as soon as any of its methods were
    called anyway.
    
    If anybody has any problems with this ABI break, please make them known
    during the 2.51 unstable development cycle and it can be reverted.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772255

 gio/gresolver.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/gresolver.c b/gio/gresolver.c
index d5387c0..56dd5a1 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -72,10 +72,13 @@ struct _GResolverPrivate {
  *
  * The object that handles DNS resolution. Use g_resolver_get_default()
  * to get the default resolver.
+ *
+ * This is an abstract type; subclasses of it implement different resolvers for
+ * different platforms and situations.
  */
-G_DEFINE_TYPE_WITH_CODE (GResolver, g_resolver, G_TYPE_OBJECT,
-                         G_ADD_PRIVATE (GResolver)
-                        g_networking_init ();)
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GResolver, g_resolver, G_TYPE_OBJECT,
+                                  G_ADD_PRIVATE (GResolver)
+                                  g_networking_init ();)
 
 static GList *
 srv_records_to_targets (GList *records)


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