gobject-introspection r416 - in trunk: . girepository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r416 - in trunk: . girepository
- Date: Wed, 20 Aug 2008 15:05:46 +0000 (UTC)
Author: walters
Date: Wed Aug 20 15:05:46 2008
New Revision: 416
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=416&view=rev
Log:
Union field parsing
2008-08-20 Colin Walters <walters verbum org>
* girepository/girparser.c: Parse union fields.
Modified:
trunk/ChangeLog
trunk/girepository/girparser.c
Modified: trunk/girepository/girparser.c
==============================================================================
--- trunk/girepository/girparser.c (original)
+++ trunk/girepository/girparser.c Wed Aug 20 15:05:46 2008
@@ -53,8 +53,9 @@
STATE_STRUCT_FIELD,
STATE_ERRORDOMAIN,
STATE_UNION,
- STATE_NAMESPACE_CONSTANT,
- STATE_CLASS_CONSTANT, /* 25 */
+ STATE_UNION_FIELD,
+ STATE_NAMESPACE_CONSTANT, /* 25 */
+ STATE_CLASS_CONSTANT,
STATE_INTERFACE_CONSTANT,
STATE_ALIAS
} ParseState;
@@ -882,6 +883,7 @@
union_->discriminators = g_list_append (union_->discriminators, constant);
}
+ state_switch (ctx, STATE_UNION_FIELD);
}
break;
default:
@@ -1364,6 +1366,7 @@
!(ctx->state == STATE_FUNCTION_PARAMETER ||
ctx->state == STATE_FUNCTION_RETURN ||
ctx->state == STATE_STRUCT_FIELD ||
+ ctx->state == STATE_UNION_FIELD ||
ctx->state == STATE_CLASS_PROPERTY ||
ctx->state == STATE_CLASS_FIELD ||
ctx->state == STATE_INTERFACE_FIELD ||
@@ -2316,6 +2319,16 @@
state_switch (ctx, STATE_NAMESPACE);
}
break;
+
+ case STATE_UNION_FIELD:
+ if (strcmp ("type", element_name) == 0)
+ break;
+ if (require_end_element (context, ctx, "field", element_name, error))
+ {
+ state_switch (ctx, STATE_UNION);
+ }
+ break;
+
case STATE_UNION:
if (require_end_element (context, ctx, "union", element_name, error))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]