diff options
author | Bastien Nocera <hadess@hadess.net> | 2009-12-09 11:21:30 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2009-12-09 11:22:24 +0000 |
commit | 91d7a09777e90767b26b2fc5ca050142b5843da7 (patch) | |
tree | 869925f3ce492b4faf0d0d72339069c26bd09722 /girepository | |
parent | 3ba3a47663c9e2c2fe6c72a91338d6b0d369001c (diff) | |
download | gobject-introspection-91d7a09777e90767b26b2fc5ca050142b5843da7.tar.gz |
Make error more verbose in parser
By printing the function when arguments are missing
https://bugzilla.gnome.org/show_bug.cgi?id=604161
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/girparser.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c index 1bbe59fd..77416177 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -840,11 +840,14 @@ start_function (GMarkupParseContext *context, } static void -parse_param_transfer (GIrNodeParam *param, const gchar *transfer) +parse_param_transfer (GIrNodeParam *param, const gchar *transfer, const gchar *name) { if (transfer == NULL) { - g_warning ("required attribute 'transfer-ownership' missing"); + if (!name) + g_warning ("required attribute 'transfer-ownership' missing"); + else + g_warning ("required attribute 'transfer-ownership' for function '%s'", name); } else if (strcmp (transfer, "none") == 0) { @@ -948,7 +951,7 @@ start_parameter (GMarkupParseContext *context, else param->allow_none = FALSE; - parse_param_transfer (param, transfer); + parse_param_transfer (param, transfer, name); if (scope && strcmp (scope, "call") == 0) param->scope = GI_SCOPE_TYPE_CALL; @@ -1950,7 +1953,7 @@ start_return_value (GMarkupParseContext *context, state_switch (ctx, STATE_FUNCTION_RETURN); transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values); - parse_param_transfer (param, transfer); + parse_param_transfer (param, transfer, NULL); switch (CURRENT_NODE (ctx)->type) { |