[gjs] function: Properly mark the throws attribute
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] function: Properly mark the throws attribute
- Date: Fri, 10 Feb 2012 15:23:52 +0000 (UTC)
commit 0eba751ce58cd6431a89dea8c770e9f2f6b7719e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 10 10:21:22 2012 -0500
function: Properly mark the throws attribute
This is similar to a fix in gobject-introspection
gi/function.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gi/function.c b/gi/function.c
index ef06116..f405131 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -688,8 +688,15 @@ gjs_invoke_c_function(JSContext *context,
can_throw_gerror = (flags & GI_FUNCTION_THROWS) != 0;
}
break;
- case GI_INFO_TYPE_CALLBACK:
case GI_INFO_TYPE_VFUNC:
+ {
+ GIVFuncInfoFlags flags;
+ flags = g_vfunc_info_get_flags ((GIVFuncInfo *)function->info);
+ can_throw_gerror = (flags & GI_VFUNC_THROWS) != 0;
+ }
+ is_method = TRUE;
+ break;
+ case GI_INFO_TYPE_CALLBACK:
is_method = TRUE;
can_throw_gerror = FALSE;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]