[gnumeric] xlsx: avoid extra mallocs.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: avoid extra mallocs.
- Date: Sun, 1 Mar 2015 18:38:30 +0000 (UTC)
commit de7e6c1f4f53d92d53636a6224fe87134f58d050
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 1 13:38:19 2015 -0500
xlsx: avoid extra mallocs.
plugins/excel/xlsx-read-drawing.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index 19bc44e..2d43e35 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -3049,15 +3049,14 @@ xlsx_blip_start (GsfXMLIn *xin, xmlChar const **attrs)
GsfInput *input = gsf_open_pkg_open_rel (
gsf_xml_in_get_input (xin), rel, NULL);
size_t size;
- guint8 *data;
+ gpointer data;
g_return_if_fail (input != NULL);
size = gsf_input_size (input);
- data = g_new (guint8, size);
- gsf_input_read (input, size, data);
+ data = (gpointer)gsf_input_read (input, size, NULL);
g_object_unref (input);
sheet_object_image_set_image (SHEET_OBJECT_IMAGE (state->so),
- NULL, data, size, FALSE);
+ NULL, data, size, TRUE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]