summaryrefslogtreecommitdiff
path: root/girepository/gicallableinfo.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2011-05-13 12:20:05 -0400
committerDavid Zeuthen <davidz@redhat.com>2011-05-13 14:18:48 -0400
commit9c6797e0478b5025c3f2f37b1331c1328cf34f4d (patch)
tree21efe4e901211a20bf52037da529a8a490d27ab7 /girepository/gicallableinfo.c
parentb29b3ec7c9f4f9f6d979aff1bfc3dc6cb05970d2 (diff)
downloadgobject-introspection-9c6797e0478b5025c3f2f37b1331c1328cf34f4d.tar.gz
Add support for the (skip) annotation on parameters or return values
This was discussed in bug 649657. https://bugzilla.gnome.org/show_bug.cgi?id=649657 Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'girepository/gicallableinfo.c')
-rw-r--r--girepository/gicallableinfo.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/girepository/gicallableinfo.c b/girepository/gicallableinfo.c
index 1d439683..475346e2 100644
--- a/girepository/gicallableinfo.c
+++ b/girepository/gicallableinfo.c
@@ -153,6 +153,28 @@ g_callable_info_may_return_null (GICallableInfo *info)
}
/**
+ * g_callable_info_skip_return:
+ * @info: a #GICallableInfo
+ *
+ * See if a callable's return value is only useful in C.
+ *
+ * Returns: %TRUE if return value is only useful in C.
+ */
+gboolean
+g_callable_info_skip_return (GICallableInfo *info)
+{
+ GIRealInfo *rinfo = (GIRealInfo *)info;
+ SignatureBlob *blob;
+
+ g_return_val_if_fail (info != NULL, FALSE);
+ g_return_val_if_fail (GI_IS_CALLABLE_INFO (info), FALSE);
+
+ blob = (SignatureBlob *)&rinfo->typelib->data[signature_offset (info)];
+
+ return blob->skip_return;
+}
+
+/**
* g_callable_info_get_caller_owns:
* @info: a #GICallableInfo
*