summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-31 22:59:23 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:20:35 -0500
commit5a6f6a756cd5ab45389342de55d630478e7a9e9f (patch)
tree6cf44419451f4f3ff8facb6c7753f04e08e761af /girepository
parent0f5f94ed8a86355003533452a2d6cc8077d27535 (diff)
downloadgobject-introspection-5a6f6a756cd5ab45389342de55d630478e7a9e9f.tar.gz
girparser: Move <doc> handling to passthrough
https://bugzilla.gnome.org/show_bug.cgi?id=693040
Diffstat (limited to 'girepository')
-rw-r--r--girepository/girparser.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 1a83c239..6015a043 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -95,7 +95,6 @@ typedef enum
STATE_ALIAS, /* 30 */
STATE_TYPE,
STATE_ATTRIBUTE,
- STATE_DOC,
STATE_PASSTHROUGH
} ParseState;
@@ -2117,22 +2116,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
start_attribute (GMarkupParseContext *context,
const gchar *element_name,
const gchar **attribute_names,
@@ -2765,9 +2748,12 @@ start_element_handler (GMarkupParseContext *context,
attribute_names, attribute_values,
ctx, error))
goto out;
- else if (start_doc (context, element_name, attribute_names,
- attribute_values, ctx, error))
- goto out;
+ if (strcmp (element_name, "doc") == 0)
+ {
+ state_switch (ctx, STATE_PASSTHROUGH);
+ ctx->unknown_depth = 1;
+ goto out;
+ }
break;
case 'e':
@@ -3413,13 +3399,6 @@ end_element_handler (GMarkupParseContext *context,
}
break;
- case STATE_DOC:
- if (strcmp ("doc", element_name) == 0)
- {
- state_switch (ctx, ctx->prev_state);
- }
- break;
-
case STATE_PASSTHROUGH:
ctx->unknown_depth -= 1;
g_assert (ctx->unknown_depth >= 0);