[easytag/wip/future-gtk: 56/60] 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: 56/60] Use g_memory_output_stream_steal_as_bytes()
- Date: Tue, 28 Apr 2015 22:08:20 +0000 (UTC)
commit 072b7a764e1c06edaaa17aea4b25e1273bb97ba0
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]