summaryrefslogtreecommitdiff
path: root/girepository/girparser.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-02-03 13:20:00 -0500
committerColin Walters <walters@verbum.org>2012-02-03 13:20:57 -0500
commit39a70b7b108ed1a262de0b9dc3ffca944d9eee0f (patch)
treea3ef3ed0fdd5893f4672aceed9c267193919f534 /girepository/girparser.c
parent79dcd9cd97b36b92a8f0dd0b94f40055fddbf7d4 (diff)
downloadgobject-introspection-39a70b7b108ed1a262de0b9dc3ffca944d9eee0f.tar.gz
girepository: Add GI_VFUNC_THROWS
Virtual functions can definitely throw an error. Right now the scanner omits the GError parameter for them and adds throws="1", but g-ir-compiler ignores this. https://bugzilla.gnome.org/show_bug.cgi?id=669332
Diffstat (limited to 'girepository/girparser.c')
-rw-r--r--girepository/girparser.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/girepository/girparser.c b/girepository/girparser.c
index fd742f94..b5c4ee32 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -2345,6 +2345,7 @@ start_vfunc (GMarkupParseContext *context,
const gchar *is_class_closure;
const gchar *offset;
const gchar *invoker;
+ const gchar *throws;
GIrNodeInterface *iface;
GIrNodeVFunc *vfunc;
@@ -2362,6 +2363,7 @@ start_vfunc (GMarkupParseContext *context,
is_class_closure = find_attribute ("is-class-closure", attribute_names, attribute_values);
offset = find_attribute ("offset", attribute_names, attribute_values);
invoker = find_attribute ("invoker", attribute_names, attribute_values);
+ throws = find_attribute ("throws", attribute_names, attribute_values);
if (name == NULL)
{
@@ -2400,6 +2402,11 @@ start_vfunc (GMarkupParseContext *context,
else
vfunc->is_class_closure = FALSE;
+ if (throws && strcmp (throws, "1") == 0)
+ vfunc->throws = TRUE;
+ else
+ vfunc->throws = FALSE;
+
if (offset)
vfunc->offset = atoi (offset);
else