diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-04 17:17:57 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-04 17:17:57 +0100 |
commit | f2005e3b2f17eb9870cc477fdc4a391919abc4be (patch) | |
tree | f9aa7e7a8ed3e8316704d5b10eecb52b4222e235 /liblogdiag | |
parent | e651ac258ae65a03731000ddb1582804570ea3dc (diff) | |
download | logdiag-f2005e3b2f17eb9870cc477fdc4a391919abc4be.tar.gz logdiag-f2005e3b2f17eb9870cc477fdc4a391919abc4be.tar.xz logdiag-f2005e3b2f17eb9870cc477fdc4a391919abc4be.zip |
Make LdDiagram work with json-glib 0.10.
Diffstat (limited to 'liblogdiag')
-rw-r--r-- | liblogdiag/ld-diagram.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/liblogdiag/ld-diagram.c b/liblogdiag/ld-diagram.c index 3120c58..9acea59 100644 --- a/liblogdiag/ld-diagram.c +++ b/liblogdiag/ld-diagram.c @@ -393,6 +393,8 @@ ld_diagram_save_to_file (LdDiagram *self, GFileOutputStream *file_stream; JsonGenerator *generator; JsonNode *root; + gchar *buffer; + gsize length; GError *local_error; g_return_val_if_fail (LD_IS_DIAGRAM (self), FALSE); @@ -428,10 +430,12 @@ ld_diagram_save_to_file (LdDiagram *self, json_node_free (root); local_error = NULL; - json_generator_to_stream (generator, G_OUTPUT_STREAM (file_stream), - NULL, &local_error); + buffer = json_generator_to_data (generator, &length); + g_output_stream_write (G_OUTPUT_STREAM (file_stream), + buffer, length, NULL, &local_error); g_object_unref (file_stream); g_object_unref (generator); + g_free (buffer); if (local_error) { |