[librsvg] Rename data_input_stream to compressed_input_stream for clarity



commit d0e169e94a925fe7596b9e2c6edba513320fa0c2
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 5635e7d..bc1cd1e 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1909,8 +1909,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++;
@@ -1923,8 +1924,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 {
@@ -1966,12 +1967,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 a6ded9a..b49b3b7 100644
--- a/rsvg-gobject.c
+++ b/rsvg-gobject.c
@@ -88,7 +88,7 @@ rsvg_handle_init (RsvgHandle * self)
     self->priv->treebase = NULL;
     self->priv->element_name_stack = NULL;
 
-    self->priv->data_input_stream = NULL;
+    self->priv->compressed_input_stream = NULL;
     self->priv->cancellable = NULL;
 
     self->priv->is_disposed = FALSE;
@@ -155,9 +155,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 b7840d6..4a6b3a4 100644
--- a/rsvg-private.h
+++ b/rsvg-private.h
@@ -182,7 +182,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 */
 
     gboolean is_testing; /* Are we being run from the test suite? */
 };


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