diff options
author | Johan Dahlin <johan@gnome.org> | 2010-05-27 00:08:20 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-05-27 00:09:55 -0300 |
commit | e77f99fba5fce4dd0d4810707aa1aeac2ba0fb50 (patch) | |
tree | a837d6e79a57c2f085f42a8794dc535afc6d51a7 /tests | |
parent | 666bb8d76a648011a49f14b6db4558e256c8e31b (diff) | |
download | gobject-introspection-e77f99fba5fce4dd0d4810707aa1aeac2ba0fb50.tar.gz |
[scanner] Element-type annotation for GArray types
Add support for (element-type) annotations for G*Array
types.
https://bugzilla.gnome.org/show_bug.cgi?id=619545
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/annotation-1.0-expected.gir | 12 | ||||
-rw-r--r-- | tests/scanner/annotation-1.0-expected.tgir | 12 | ||||
-rw-r--r-- | tests/scanner/annotation.c | 9 | ||||
-rw-r--r-- | tests/scanner/annotation.h | 3 |
4 files changed, 36 insertions, 0 deletions
diff --git a/tests/scanner/annotation-1.0-expected.gir b/tests/scanner/annotation-1.0-expected.gir index 035b32e1..25216d1a 100644 --- a/tests/scanner/annotation-1.0-expected.gir +++ b/tests/scanner/annotation-1.0-expected.gir @@ -607,6 +607,18 @@ detection, and fixing it via annotations."> </parameter> </parameters> </function> + <function name="ptr_array" c:identifier="annotation_ptr_array"> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + <parameters> + <parameter name="array" transfer-ownership="none" doc="the array"> + <array name="GLib.PtrArray" c:type="GPtrArray*"> + <type name="GLib.Value"/> + </array> + </parameter> + </parameters> + </function> <function name="return_array" c:identifier="annotation_return_array"> <return-value transfer-ownership="full" doc="The return value"> <array length="0" c:type="char**"> diff --git a/tests/scanner/annotation-1.0-expected.tgir b/tests/scanner/annotation-1.0-expected.tgir index 3b37cf2b..aafd0701 100644 --- a/tests/scanner/annotation-1.0-expected.tgir +++ b/tests/scanner/annotation-1.0-expected.tgir @@ -440,6 +440,18 @@ </parameter> </parameters> </function> + <function name="ptr_array" c:identifier="annotation_ptr_array"> + <return-value transfer-ownership="none"> + <type name="none"/> + </return-value> + <parameters> + <parameter name="array" transfer-ownership="none"> + <array> + <type name="GLib.Value"/> + </array> + </parameter> + </parameters> + </function> <function name="return_array" c:identifier="annotation_return_array"> <return-value transfer-ownership="full"> <array length="0"> diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c index fb025b97..e1376e4c 100644 --- a/tests/scanner/annotation.c +++ b/tests/scanner/annotation.c @@ -673,4 +673,13 @@ annotation_set_source_file (const char *fname) { } +/** + * annotation_ptr_array: + * @array: (element-type GLib.Value): the array + */ +void +annotation_ptr_array (GPtrArray *array) +{ +} + char backslash_parsing_tester_2 = '\\'; diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h index 798594b1..0f47d22e 100644 --- a/tests/scanner/annotation.h +++ b/tests/scanner/annotation.h @@ -149,4 +149,7 @@ struct AnnotationStruct AnnotationObject *objects[10]; }; +void annotation_ptr_array (GPtrArray *array); + #endif /* __ANNOTATION_OBJECT_H__ */ + |