diff options
author | Colin Walters <walters@verbum.org> | 2010-08-19 09:31:47 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-08-31 16:05:56 -0400 |
commit | f8ddb18535cfcc60fc28095f0f6db2895d90edac (patch) | |
tree | 63162306bc979d01e12cff4ddcdce304ff888121 /tests/scanner/annotation.c | |
parent | e66d50732c8ce5cf3ef198e114d94e102a1c4911 (diff) | |
download | gobject-introspection-f8ddb18535cfcc60fc28095f0f6db2895d90edac.tar.gz |
tests/scanner: Update annotations and tests
First of all, add missing (transfer) annotations that will be
required by the new scanner.
Other changes:
Don't use the (type bitfield) hack; the new scanner will not accept it.
Use shifts in the flag constants instead.
Use typedefs consistently for structures.
Drop scanning of anonymous structure/union members.
Diffstat (limited to 'tests/scanner/annotation.c')
-rw-r--r-- | tests/scanner/annotation.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c index 015fd833..40df0860 100644 --- a/tests/scanner/annotation.c +++ b/tests/scanner/annotation.c @@ -89,7 +89,7 @@ annotation_object_class_init (AnnotationObjectClass *klass) /** * AnnotationObject::list-signal: * @annotation: the annotation object - * @list: (type GLib.List): (element-type utf8): (transfer container): a list of strings + * @list: (type GLib.List) (element-type utf8): (transfer container): a list of strings * * This is a signal which takes a list of strings, but it's not * known by GObject as it's only marked as G_TYPE_POINTER @@ -310,7 +310,7 @@ annotation_object_calleesowns (AnnotationObject *object, * This is a test for returning a list of strings, where * each string needs to be freed. * - * Return value: (element-type utf8) (transfer): list of strings + * Return value: (element-type utf8) (transfer full): list of strings */ GList* annotation_object_get_strings (AnnotationObject *object) @@ -328,7 +328,7 @@ annotation_object_get_strings (AnnotationObject *object) * This is a test for returning a hash table mapping strings to * objects. * - * Return value: (element-type utf8 GObject): hash table + * Return value: (element-type utf8 GObject) (transfer full): hash table */ GHashTable* annotation_object_get_hash (AnnotationObject *object) @@ -374,7 +374,7 @@ annotation_object_get_objects (AnnotationObject *object) * * Test returning a caller-owned object * - * Return value: (transfer): The object + * Return value: (transfer full): The object **/ GObject* annotation_object_create_object (AnnotationObject *object) @@ -382,6 +382,11 @@ annotation_object_create_object (AnnotationObject *object) return g_object_ref (object); } +/** + * annotation_object_use_buffer: + * @object: a #GObject + * + **/ void annotation_object_use_buffer (AnnotationObject *object, guchar *bytes) @@ -504,7 +509,7 @@ annotation_object_set_data (AnnotationObject *object, /** * annotation_object_set_data2: * @object: a #AnnotationObject - * @data: (array length=length): The data + * @data: (array length=length) (element-type gint8): The data * @length: Length of the data * * Test taking a gchar * with a length. @@ -538,6 +543,8 @@ annotation_object_set_data3 (AnnotationObject *object, * annotation_object_allow_none: * @object: a #GObject * @somearg: (allow-none): + * + * Returns: (transfer none): %NULL always **/ GObject* annotation_object_allow_none (AnnotationObject *object, const gchar *somearg) @@ -562,6 +569,7 @@ annotation_object_notrans (AnnotationObject *object) * annotation_object_do_not_use: * @object: a #GObject * + * Returns: (transfer none): %NULL always * Deprecated: 0.12: Use annotation_object_create_object() instead. **/ GObject* @@ -571,7 +579,7 @@ annotation_object_do_not_use (AnnotationObject *object) } /** - * annotation_object_watch: + * annotation_object_watch: (skip) * @object: A #AnnotationObject * @func: The callback * @user_data: The callback data @@ -620,7 +628,7 @@ annotation_init (int *argc, char ***argv) * annotation_return_array: * @length: (out): Number of return values * - * Return value: (array length=length): The return value + * Return value: (transfer full) (array length=length): The return value **/ char ** annotation_return_array (int *length) @@ -631,7 +639,7 @@ annotation_return_array (int *length) /** * annotation_string_zero_terminated: * - * Return value: (array zero-terminated=1): The return value + * Return value: (transfer full) (array zero-terminated=1): The return value **/ char ** annotation_string_zero_terminated (void) @@ -696,7 +704,7 @@ annotation_custom_destroy (AnnotationCallback callback, /** * annotation_get_source_file: * - * Return value: (type filename): Source file + * Return value: (type filename) (transfer full): Source file */ char * annotation_get_source_file (void) |