summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2008-08-07 12:53:29 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-08-07 12:53:29 +0000
commite4d997cafeefb65bd5ebdbd9fc03849541284b32 (patch)
treeaf351d6127ea4abafd35d26ce945865c37338bfe
parentb5bb46f9f84bb2687f972d4e6829f79714e5fe7b (diff)
downloadgobject-introspection-e4d997cafeefb65bd5ebdbd9fc03849541284b32.tar.gz
Attach the return node to the function/signal/vfunc node
svn path=/branches/gir-compiler/; revision=315
-rw-r--r--tools/girparser.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/girparser.c b/tools/girparser.c
index 315322d2..8012ced2 100644
--- a/tools/girparser.c
+++ b/tools/girparser.c
@@ -1297,7 +1297,7 @@ start_type (GMarkupParseContext *context,
MISSING_ATTRIBUTE (context, error, element_name, "name");
if (ctype == NULL)
MISSING_ATTRIBUTE (context, error, element_name, "c:type");
-
+
switch (ctx->current_typed->type)
{
case G_IR_NODE_PARAM:
@@ -1323,6 +1323,7 @@ start_type (GMarkupParseContext *context,
g_printerr("current node is %d\n", ctx->current_node->type);
g_assert_not_reached ();
}
+
ctx->current_typed = NULL;
return TRUE;
}
@@ -1349,6 +1350,31 @@ start_return_value (GMarkupParseContext *context,
state_switch (ctx, STATE_FUNCTION_RETURN);
+ switch (ctx->current_node->type)
+ {
+ case G_IR_NODE_FUNCTION:
+ case G_IR_NODE_CALLBACK:
+ {
+ GIrNodeFunction *func = (GIrNodeFunction *)ctx->current_node;
+ func->result = param;
+ }
+ break;
+ case G_IR_NODE_SIGNAL:
+ {
+ GIrNodeSignal *signal = (GIrNodeSignal *)ctx->current_node;
+ signal->result = param;
+ }
+ break;
+ case G_IR_NODE_VFUNC:
+ {
+ GIrNodeVFunc *vfunc = (GIrNodeVFunc *)ctx->current_node;
+ vfunc->result = param;
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
return TRUE;
}