summaryrefslogtreecommitdiff
path: root/tests/scanner/foo.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2009-02-19 12:16:17 -0500
committerColin Walters <walters@verbum.org>2009-03-16 14:05:23 -0400
commit6531a094d73703c0c16777bdc82252688d1c7d51 (patch)
treeddcb4921fc322d27381e90060f2e2776f4dfada7 /tests/scanner/foo.c
parent90526643ceb248c56e40f5b6755c3cbb91c3857c (diff)
downloadgobject-introspection-6531a094d73703c0c16777bdc82252688d1c7d51.tar.gz
Bug 565147 - Add (type) annotation to override the C type definition
We previously supported (type) on signals only, extend it to all cases. This is useful for a few cases where libraries use a superclass like GtkWidget* for C convenience, where the actual type is a subclass.
Diffstat (limited to 'tests/scanner/foo.c')
-rw-r--r--tests/scanner/foo.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c
index 8a9283d9..6cb1f3f4 100644
--- a/tests/scanner/foo.c
+++ b/tests/scanner/foo.c
@@ -269,6 +269,20 @@ foo_subobject_init (FooSubobject *object)
}
+/**
+ * foo_object_get_default:
+ *
+ * This function is intended to match clutter_stage_get_default which
+ * uses a C sugar return type.
+ *
+ * Return value: (type FooSubobject): The global #FooSubobject
+ */
+FooObject *
+foo_object_get_default ()
+{
+ return NULL;
+}
+
int foo_init (void)
{
return FOO_SUCCESS_INT;