diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-04-09 15:41:39 -0300 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-08-20 15:01:59 -0400 |
commit | d220bb74c25ce098fb3cb074bb03a0868032e89c (patch) | |
tree | 40ad0848b916c2f6c82e35a0aa2ace513ece15e6 /girepository/girffi.c | |
parent | a908f28103bdbc3ca1c3035b9b447a1f0c1709a2 (diff) | |
download | gobject-introspection-d220bb74c25ce098fb3cb074bb03a0868032e89c.tar.gz |
gicallableinfo: Add two new convenience methods: is_method and can_throw_gerror
https://bugzilla.gnome.org/show_bug.cgi?id=673805
Diffstat (limited to 'girepository/girffi.c')
-rw-r--r-- | girepository/girffi.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/girepository/girffi.c b/girepository/girffi.c index 11400613..f6e47fb0 100644 --- a/girepository/girffi.c +++ b/girepository/girffi.c @@ -289,33 +289,8 @@ g_function_invoker_new_for_address (gpointer addr, invoker->native_address = addr; - info_type = g_base_info_get_type ((GIBaseInfo *) info); - - switch (info_type) - { - case GI_INFO_TYPE_FUNCTION: - { - GIFunctionInfoFlags flags; - flags = g_function_info_get_flags ((GIFunctionInfo *)info); - is_method = (flags & GI_FUNCTION_IS_METHOD) != 0; - throws = (flags & GI_FUNCTION_THROWS) != 0; - } - break; - case GI_INFO_TYPE_VFUNC: - { - GIVFuncInfoFlags flags; - flags = g_vfunc_info_get_flags ((GIVFuncInfo *)info); - throws = (flags & GI_VFUNC_THROWS) != 0; - } - is_method = TRUE; - break; - case GI_INFO_TYPE_CALLBACK: - is_method = TRUE; - throws = FALSE; - break; - default: - g_assert_not_reached (); - } + is_method = g_callable_info_is_method (info); + throws = g_callable_info_can_throw_gerror (info); tinfo = g_callable_info_get_return_type (info); rtype = g_type_info_get_ffi_type (tinfo); |