[libsoup/wip/withprivate: 15/26] client-input-stream: port to the new private api



commit 5c838b9771d3276914bcf903f46182985064a58b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Nov 7 10:51:07 2016 +0100

    client-input-stream: port to the new private api

 libsoup/soup-client-input-stream.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/libsoup/soup-client-input-stream.c b/libsoup/soup-client-input-stream.c
index 1798306..c305dd8 100644
--- a/libsoup/soup-client-input-stream.c
+++ b/libsoup/soup-client-input-stream.c
@@ -34,15 +34,14 @@ static GPollableInputStreamInterface *soup_client_input_stream_parent_pollable_i
 static void soup_client_input_stream_pollable_init (GPollableInputStreamInterface *pollable_interface, 
gpointer interface_data);
 
 G_DEFINE_TYPE_WITH_CODE (SoupClientInputStream, soup_client_input_stream, SOUP_TYPE_FILTER_INPUT_STREAM,
+                         G_ADD_PRIVATE (SoupClientInputStream)
                         G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM,
                                                soup_client_input_stream_pollable_init))
 
 static void
 soup_client_input_stream_init (SoupClientInputStream *stream)
 {
-       stream->priv = G_TYPE_INSTANCE_GET_PRIVATE (stream,
-                                                   SOUP_TYPE_CLIENT_INPUT_STREAM,
-                                                   SoupClientInputStreamPrivate);
+       stream->priv = soup_client_input_stream_get_instance_private (stream);
 }
 
 static void
@@ -215,8 +214,6 @@ soup_client_input_stream_class_init (SoupClientInputStreamClass *stream_class)
        GObjectClass *object_class = G_OBJECT_CLASS (stream_class);
        GInputStreamClass *input_stream_class = G_INPUT_STREAM_CLASS (stream_class);
 
-       g_type_class_add_private (stream_class, sizeof (SoupClientInputStreamPrivate));
-
        object_class->finalize = soup_client_input_stream_finalize;
        object_class->set_property = soup_client_input_stream_set_property;
        object_class->get_property = soup_client_input_stream_get_property;


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