mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
[girparser] Cleanly pass through c:include
This commit is contained in:
parent
439753a5b3
commit
f552f46f88
13
girparser.c
13
girparser.c
@ -47,6 +47,7 @@ typedef enum
|
||||
STATE_END,
|
||||
STATE_REPOSITORY,
|
||||
STATE_INCLUDE,
|
||||
STATE_C_INCLUDE,
|
||||
STATE_PACKAGE,
|
||||
STATE_NAMESPACE, /* 5 */
|
||||
STATE_ENUM,
|
||||
@ -2734,6 +2735,11 @@ start_element_handler (GMarkupParseContext *context,
|
||||
attribute_names, attribute_values,
|
||||
ctx, error))
|
||||
goto out;
|
||||
else if (strcmp (element_name, "c:include") == 0)
|
||||
{
|
||||
state_switch (ctx, STATE_C_INCLUDE);
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@ -3033,6 +3039,13 @@ end_element_handler (GMarkupParseContext *context,
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_C_INCLUDE:
|
||||
if (require_end_element (context, ctx, "c:include", element_name, error))
|
||||
{
|
||||
state_switch (ctx, STATE_REPOSITORY);
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_PACKAGE:
|
||||
if (require_end_element (context, ctx, "package", element_name, error))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user