[librsvg/librsvg-2.40] Rename data_input_stream to compressed_input_stream for clarity



commit 88f5f60563868098b2d6980a00386803496ba6d4
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Oct 3 15:01:52 2017 -0500

    Rename data_input_stream to compressed_input_stream for clarity

 rsvg-base.c    |   17 +++++++++--------
 rsvg-gobject.c |    8 ++++----
 rsvg-private.h |    2 +-
 3 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 4a20306..135d880 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1771,8 +1771,9 @@ rsvg_handle_write (RsvgHandle * handle, const guchar * buf, gsize count, GError
             if (buf[0] == GZ_MAGIC_1) {
                 static const guchar gz_magic[2] = { GZ_MAGIC_0, GZ_MAGIC_1 };
 
-                priv->data_input_stream = g_memory_input_stream_new ();
-                g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (priv->data_input_stream), gz_magic, 
2, NULL);
+                priv->compressed_input_stream = g_memory_input_stream_new ();
+                g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (priv->compressed_input_stream),
+                                                gz_magic, 2, NULL);
 
                 priv->state = RSVG_HANDLE_STATE_READING;
                 buf++;
@@ -1785,8 +1786,8 @@ rsvg_handle_write (RsvgHandle * handle, const guchar * buf, gsize count, GError
             break;
 
         case RSVG_HANDLE_STATE_READING:
-            if (priv->data_input_stream) {
-                g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (priv->data_input_stream),
+            if (priv->compressed_input_stream) {
+                g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (priv->compressed_input_stream),
                                                 g_memdup (buf, count), count, (GDestroyNotify) g_free);
                 return TRUE;
             } else {
@@ -1828,12 +1829,12 @@ rsvg_handle_close (RsvgHandle * handle, GError ** error)
         return TRUE;
     }
 
-    if (priv->data_input_stream) {
+    if (priv->compressed_input_stream) {
         gboolean ret;
 
-        ret = rsvg_handle_read_stream_sync (handle, priv->data_input_stream, NULL, error);
-        g_object_unref (priv->data_input_stream);
-        priv->data_input_stream = NULL;
+        ret = rsvg_handle_read_stream_sync (handle, priv->compressed_input_stream, NULL, error);
+        g_object_unref (priv->compressed_input_stream);
+        priv->compressed_input_stream = NULL;
 
         return ret;
     }
diff --git a/rsvg-gobject.c b/rsvg-gobject.c
index 9b7fdc1..2d9d273 100644
--- a/rsvg-gobject.c
+++ b/rsvg-gobject.c
@@ -88,7 +88,7 @@ rsvg_handle_init (RsvgHandle * self)
     self->priv->currentnode = NULL;
     self->priv->treebase = NULL;
 
-    self->priv->data_input_stream = NULL;
+    self->priv->compressed_input_stream = NULL;
     self->priv->cancellable = NULL;
 
     self->priv->is_disposed = FALSE;
@@ -127,9 +127,9 @@ rsvg_handle_dispose (GObject *instance)
         g_object_unref (self->priv->base_gfile);
         self->priv->base_gfile = NULL;
     }
-    if (self->priv->data_input_stream) {
-        g_object_unref (self->priv->data_input_stream);
-        self->priv->data_input_stream = NULL;
+    if (self->priv->compressed_input_stream) {
+        g_object_unref (self->priv->compressed_input_stream);
+        self->priv->compressed_input_stream = NULL;
     }
 
     g_clear_object (&self->priv->cancellable);
diff --git a/rsvg-private.h b/rsvg-private.h
index 4803b93..8dfdfbf 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -185,7 +185,7 @@ struct RsvgHandlePrivate {
 
     gboolean in_loop;          /* see get_dimension() */
 
-    GInputStream *data_input_stream; /* for rsvg_handle_write of svgz data */
+    GInputStream *compressed_input_stream; /* for rsvg_handle_write of svgz data */
 };
 
 typedef struct {


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