[librsvg: 1/18] sax_error_cb(): Construct a string with the error message
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/18] sax_error_cb(): Construct a string with the error message
- Date: Fri, 23 Nov 2018 22:31:34 +0000 (UTC)
commit 328483d25dfd1b7d85b00d70a334ef64467bf5b9
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Nov 22 16:31:01 2018 -0600
sax_error_cb(): Construct a string with the error message
librsvg/rsvg-load.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/librsvg/rsvg-load.c b/librsvg/rsvg-load.c
index 69d591a2..35fea27e 100644
--- a/librsvg/rsvg-load.c
+++ b/librsvg/rsvg-load.c
@@ -25,6 +25,7 @@
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <string.h>
+#include <glib/gprintf.h>
#include "rsvg-attributes.h"
#include "rsvg-load.h"
@@ -434,13 +435,14 @@ sax_get_parameter_entity_cb (void *data, const xmlChar * name)
static void
sax_error_cb (void *data, const char *msg, ...)
{
-#ifdef G_ENABLE_DEBUG
va_list args;
+ char *buf;
va_start (args, msg);
- vfprintf (stderr, msg, args);
+ g_vasprintf (&buf, msg, args);
va_end (args);
-#endif
+
+ g_free (buf);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]