[easytag/wip/future-gtk: 3/3] 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: 3/3] Use g_memory_output_stream_steal_as_bytes()
- Date: Fri, 9 Jan 2015 20:13:21 +0000 (UTC)
commit c4c1121c4cde5a18650d931abdf15ad274f30da7
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 a9f53cd..699cfa5 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -426,8 +426,6 @@ et_picture_load_file_data (GFile *file, GError **error)
{
/* Image loaded. */
GBytes *bytes;
- gpointer data;
- gsize data_size;
g_object_unref (file_istream);
@@ -440,10 +438,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]