[easytag/wip/future-gtk: 4/17] Use	g_memory_output_stream_steal_as_bytes()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [easytag/wip/future-gtk: 4/17] Use	g_memory_output_stream_steal_as_bytes()
- Date: Mon,  4 May 2015 19:36:15 +0000 (UTC)
commit 4027730e994623752578f95d0cfbf5b1402dae26
Author: David King <amigadave amigadave com>
Date:   Fri Jan 9 20:12:30 2015 +0000
    Use g_memory_output_stream_steal_as_bytes()
    
    Added in GIO 2.34.
 src/picture.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/picture.c b/src/picture.c
index 8845585..2fedee2 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -421,8 +421,6 @@ et_picture_load_file_data (GFile *file, GError **error)
     {
         /* Image loaded. */
         GBytes *bytes;
-        gpointer data;
-        gsize data_size;
 
         g_object_unref (file_istream);
 
@@ -435,10 +433,7 @@ et_picture_load_file_data (GFile *file, GError **error)
 
         g_assert (error == NULL || *error == NULL);
 
-        data = g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (ostream));
-        data_size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (ostream));
-        bytes = g_bytes_new_take (data, data_size);
-        /* TODO: Use g_memory_output_stream_steal_as_bytes(). */
+        bytes = g_memory_output_stream_steal_as_bytes (G_MEMORY_OUTPUT_STREAM (ostream));
 
         g_object_unref (ostream);
         g_assert (error == NULL || *error == NULL);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]