[libsoup/wip/withprivate: 16/26] connection-auth: port to the new private api



commit c3036dfea4eccafd52b4265dc81d7b6b527108bf
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Nov 7 10:52:19 2016 +0100

    connection-auth: port to the new private api
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774189

 libsoup/soup-connection-auth.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/libsoup/soup-connection-auth.c b/libsoup/soup-connection-auth.c
index fc32733..8362095 100644
--- a/libsoup/soup-connection-auth.c
+++ b/libsoup/soup-connection-auth.c
@@ -18,16 +18,16 @@
 #include "soup-connection.h"
 #include "soup-message-private.h"
 
-G_DEFINE_ABSTRACT_TYPE (SoupConnectionAuth, soup_connection_auth, SOUP_TYPE_AUTH)
-
 struct SoupConnectionAuthPrivate {
        GHashTable *conns;
 };
 
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (SoupConnectionAuth, soup_connection_auth, SOUP_TYPE_AUTH)
+
 static void
 soup_connection_auth_init (SoupConnectionAuth *auth)
 {
-       auth->priv = G_TYPE_INSTANCE_GET_PRIVATE (auth, SOUP_TYPE_CONNECTION_AUTH, SoupConnectionAuthPrivate);
+       auth->priv = soup_connection_auth_get_instance_private (auth);
 
        auth->priv->conns = g_hash_table_new (NULL, NULL);
 }
@@ -163,8 +163,6 @@ soup_connection_auth_class_init (SoupConnectionAuthClass *connauth_class)
        SoupAuthClass *auth_class = SOUP_AUTH_CLASS (connauth_class);
        GObjectClass *object_class = G_OBJECT_CLASS (connauth_class);
 
-       g_type_class_add_private (connauth_class, sizeof (SoupConnectionAuthPrivate));
-
        auth_class->update = soup_connection_auth_update;
        auth_class->get_authorization = soup_connection_auth_get_authorization;
        auth_class->is_ready = soup_connection_auth_is_ready;


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