mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-05 20:30:07 +02:00
girparser: Move <doc> handling to passthrough
https://bugzilla.gnome.org/show_bug.cgi?id=693040
This commit is contained in:
parent
259c10f787
commit
37791c8267
33
girparser.c
33
girparser.c
@ -95,7 +95,6 @@ typedef enum
|
|||||||
STATE_ALIAS, /* 30 */
|
STATE_ALIAS, /* 30 */
|
||||||
STATE_TYPE,
|
STATE_TYPE,
|
||||||
STATE_ATTRIBUTE,
|
STATE_ATTRIBUTE,
|
||||||
STATE_DOC,
|
|
||||||
STATE_PASSTHROUGH
|
STATE_PASSTHROUGH
|
||||||
} ParseState;
|
} ParseState;
|
||||||
|
|
||||||
@ -2116,22 +2115,6 @@ end_type (ParseContext *ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
start_doc (GMarkupParseContext *context,
|
|
||||||
const gchar *element_name,
|
|
||||||
const gchar **attribute_names,
|
|
||||||
const gchar **attribute_values,
|
|
||||||
ParseContext *ctx,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
if (strcmp (element_name, "doc") != 0)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
state_switch (ctx, STATE_DOC);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_attribute (GMarkupParseContext *context,
|
start_attribute (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
@ -2765,9 +2748,12 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
attribute_names, attribute_values,
|
attribute_names, attribute_values,
|
||||||
ctx, error))
|
ctx, error))
|
||||||
goto out;
|
goto out;
|
||||||
else if (start_doc (context, element_name, attribute_names,
|
if (strcmp (element_name, "doc") == 0)
|
||||||
attribute_values, ctx, error))
|
{
|
||||||
goto out;
|
state_switch (ctx, STATE_PASSTHROUGH);
|
||||||
|
ctx->unknown_depth = 1;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
@ -3413,13 +3399,6 @@ end_element_handler (GMarkupParseContext *context,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_DOC:
|
|
||||||
if (strcmp ("doc", element_name) == 0)
|
|
||||||
{
|
|
||||||
state_switch (ctx, ctx->prev_state);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STATE_PASSTHROUGH:
|
case STATE_PASSTHROUGH:
|
||||||
ctx->unknown_depth -= 1;
|
ctx->unknown_depth -= 1;
|
||||||
g_assert (ctx->unknown_depth >= 0);
|
g_assert (ctx->unknown_depth >= 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user