diff options
author | Johan Dahlin <johan@src.gnome.org> | 2008-08-07 12:53:29 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-08-07 12:53:29 +0000 |
commit | e4d997cafeefb65bd5ebdbd9fc03849541284b32 (patch) | |
tree | af351d6127ea4abafd35d26ce945865c37338bfe | |
parent | b5bb46f9f84bb2687f972d4e6829f79714e5fe7b (diff) | |
download | gobject-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.c | 28 |
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; } |