mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 18:26:19 +01:00
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.
This commit is contained in:
parent
2c0a8ff4dc
commit
73af5ab4cf
@ -1320,6 +1320,8 @@ parser_start_element (GMarkupParseContext *context,
|
|||||||
attribute_values,
|
attribute_values,
|
||||||
error,
|
error,
|
||||||
G_MARKUP_COLLECT_STRING, "name", &name,
|
G_MARKUP_COLLECT_STRING, "name", &name,
|
||||||
|
/* seen in the wild */
|
||||||
|
G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL, "version", NULL,
|
||||||
G_MARKUP_COLLECT_INVALID))
|
G_MARKUP_COLLECT_INVALID))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -1349,6 +1351,8 @@ parser_start_element (GMarkupParseContext *context,
|
|||||||
attribute_values,
|
attribute_values,
|
||||||
error,
|
error,
|
||||||
G_MARKUP_COLLECT_STRING, "name", &name,
|
G_MARKUP_COLLECT_STRING, "name", &name,
|
||||||
|
/* seen in the wild */
|
||||||
|
G_MARKUP_COLLECT_STRING | G_MARKUP_COLLECT_OPTIONAL, "version", NULL,
|
||||||
G_MARKUP_COLLECT_INVALID))
|
G_MARKUP_COLLECT_INVALID))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user