summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPavel Holejsovsky <pholejs@src.gnome.org>2010-12-21 16:21:02 +0100
committerPavel Holejsovsky <pholejs@src.gnome.org>2010-12-21 16:31:10 +0100
commite0d54af03a9de674af11fe7b4b58859e000c777e (patch)
treedd6b6956350775427e98039d99533e0b4dd4236d /tests
parentb64c1e40f931cd56f4ab7d51c8f4c876ac0013ee (diff)
downloadgobject-introspection-e0d54af03a9de674af11fe7b4b58859e000c777e.tar.gz
scanner: avoid crash when annotation explicitly changes 'self' argument
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/Annotation-1.0-expected.gir5
-rw-r--r--tests/scanner/annotation.c9
-rw-r--r--tests/scanner/annotation.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir
index 6ee00f76..29c8bd69 100644
--- a/tests/scanner/Annotation-1.0-expected.gir
+++ b/tests/scanner/Annotation-1.0-expected.gir
@@ -263,6 +263,11 @@ each string needs to be freed.</doc>
</type>
</return-value>
</method>
+ <method name="hidden_self" c:identifier="annotation_object_hidden_self">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ </method>
<method name="in" c:identifier="annotation_object_in">
<doc xml:whitespace="preserve">This is a test for in arguments</doc>
<return-value transfer-ownership="none">
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c
index 4c25178c..f7046e89 100644
--- a/tests/scanner/annotation.c
+++ b/tests/scanner/annotation.c
@@ -614,6 +614,15 @@ annotation_object_watch_full (AnnotationObject *object,
}
/**
+ * annotation_object_hidden_self:
+ * @object: (type AnnotationObject): A #AnnotationObject
+ **/
+void
+annotation_object_hidden_self (gpointer object)
+{
+}
+
+/**
* annotation_init:
* @argc: (inout): The number of args.
* @argv: (inout) (array length=argc): The arguments.
diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h
index b58aa814..e4c5de63 100644
--- a/tests/scanner/annotation.h
+++ b/tests/scanner/annotation.h
@@ -127,6 +127,7 @@ void annotation_object_watch_full (AnnotationObject *object,
AnnotationForeachFunc func,
gpointer user_data,
GDestroyNotify destroy);
+void annotation_object_hidden_self (gpointer object);
void annotation_init (int *argc,
char ***argv);