[glib] Be more forgiving when parsing introspection xml
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Be more forgiving when parsing introspection xml
- Date: Sat, 19 Feb 2011 21:28:48 +0000 (UTC)
commit 73af5ab4cf14d33495ba098af3b53f7d7f257256
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 19 16:27:51 2011 -0500
Be more forgiving when parsing introspection xml
Accept (and silently ignore) version attributes on <interface>
and <method> elements - these occur in the wild, and ignoring
them does not cost us anything.
gio/gdbusintrospection.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusintrospection.c b/gio/gdbusintrospection.c
index 348f514..5d9b6bd 100644
--- a/gio/gdbusintrospection.c
+++ b/gio/gdbusintrospection.c
@@ -1320,6 +1320,8 @@ parser_start_element (GMarkupParseContext *context,
attribute_values,
error,
G_MARKUP_COLLECT_STRING, "name", &name,
+ /* seen in the wild */
+ G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL, "version", NULL,
G_MARKUP_COLLECT_INVALID))
goto out;
@@ -1349,6 +1351,8 @@ parser_start_element (GMarkupParseContext *context,
attribute_values,
error,
G_MARKUP_COLLECT_STRING, "name", &name,
+ /* seen in the wild */
+ G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL, "version", NULL,
G_MARKUP_COLLECT_INVALID))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]