diff options
author | Tommi Komulainen <tommi.komulainen@iki.fi> | 2008-10-22 10:46:22 +0000 |
---|---|---|
committer | Tommi Komulainen <tko@src.gnome.org> | 2008-10-22 10:46:22 +0000 |
commit | 7b171be482d33af3f4a6afa6bf34b433ce70fdb1 (patch) | |
tree | 376502991554e7b22f051624c2f16b658ac40c64 /tests | |
parent | f66b137d74b4a5337e71f69dbabc86b1e5012d99 (diff) | |
download | gobject-introspection-7b171be482d33af3f4a6afa6bf34b433ce70fdb1.tar.gz |
Bug 557092 – Callback annotations not used
2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi>
* giscanner/transformer.py (_create_callback): use annotations
for callbacks
* tests/scanner/annotation.h
* tests/scanner/annotation-1.0-expected.gir: add tests
svn path=/trunk/; revision=781
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/annotation-1.0-expected.gir | 24 | ||||
-rw-r--r-- | tests/scanner/annotation.h | 16 |
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/scanner/annotation-1.0-expected.gir b/tests/scanner/annotation-1.0-expected.gir index 69325745..0bd230f0 100644 --- a/tests/scanner/annotation-1.0-expected.gir +++ b/tests/scanner/annotation-1.0-expected.gir @@ -7,6 +7,30 @@ <include name="GObject" version="2.0"/> <include name="utility" version="1.0"/> <namespace name="annotation" version="1.0" shared-library="annotation"> + <callback name="Callback" c:type="AnnotationCallback"> + <return-value transfer-ownership="none"> + <type name="int" c:type="gint*"/> + </return-value> + <parameters> + <parameter name="in" transfer-ownership="none"> + <type name="int" c:type="gint*"/> + </parameter> + </parameters> + </callback> + <callback name="ListCallback" c:type="AnnotationListCallback"> + <return-value transfer-ownership="container"> + <type name="GLib.List" c:type="GList*"> + <type name="utf8"/> + </type> + </return-value> + <parameters> + <parameter name="in" transfer-ownership="none"> + <type name="GLib.List" c:type="GList*"> + <type name="utf8"/> + </type> + </parameter> + </parameters> + </callback> <class name="Object" c:type="AnnotationObject" parent="GObject.Object" diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h index c15d578d..ea78786a 100644 --- a/tests/scanner/annotation.h +++ b/tests/scanner/annotation.h @@ -3,6 +3,22 @@ #include <glib-object.h> +/** + * AnnotationCallback: + * @in: (in) (transfer none): array of ints + * + * Return value: (transfer none): array of ints + */ +typedef const gint* (*AnnotationCallback) (const gint *in); + +/** + * AnnotationListCallback: + * @in: (in) (transfer none) (element-type utf8): list of strings + * + * Return value: (transfer container) (element-type utf8): list of strings + */ +typedef GList* (*AnnotationListCallback) (GList *in); + typedef struct _AnnotationObject AnnotationObject; typedef struct _AnnotationObjectClass AnnotationObjectClass; |