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/foo.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/foo.c')
-rw-r--r-- | tests/scanner/foo.c | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c index 6239bfac..d66817f8 100644 --- a/tests/scanner/foo.c +++ b/tests/scanner/foo.c @@ -203,6 +203,12 @@ foo_object_init (FooObject *object) } +/** + * foo_object_external_type: + * @object: a #FooObject + * + * Returns: (transfer none): %NULL always + */ UtilityObject* foo_object_external_type (FooObject *object) { @@ -227,6 +233,19 @@ foo_object_is_it_time_yet (FooObject *object, time_t time) { } +/** + * foo_object_new_cookie: (skip) + * @object: + * @target: + * + * Not sure why this test is here... + */ +FooObjectCookie +foo_object_new_cookie (FooObject *object, const char *target) +{ + return NULL; +} + const char * foo_object_get_name (FooObject *object) { @@ -286,7 +305,7 @@ foo_subobject_init (FooSubobject *object) * This function is intended to match clutter_stage_get_default which * uses a C sugar return type. * - * Return value: (type FooSubobject): The global #FooSubobject + * Return value: (type FooSubobject) (transfer none): The global #FooSubobject */ FooObject * foo_object_get_default () @@ -449,12 +468,25 @@ void foo_test_unsigned (unsigned int uint) { } +/** + * foo_test_string_array: + * @array: (array zero-terminated=1): + */ void foo_test_string_array (char **array) { } /** + * foo_test_string_array_with_g: + * @array: (array zero-terminated=1): + */ +void +foo_test_string_array_with_g (gchar **array) +{ +} + +/** * foo_test_array: * Returns: (element-type utf8) (transfer container): */ @@ -626,3 +658,32 @@ foo_skip_me (FooSkippable fs) * FooForeignStruct: (foreign) * */ + +/** + * foo_test_varargs_callback: (skip) + * + */ +void +foo_test_varargs_callback (gint i, FooVarargsCallback callback) +{ +} + +/** + * foo_test_varargs_callback2: (skip) + * + */ +void +foo_test_varargs_callback2 (FooVarargsCallback callback) +{ +} + +/** + * foo_test_varargs_callback3: (skip) + * + */ +void +foo_test_varargs_callback3 (FooVarargsCallback callback, + FooVarargsCallback callback2) +{ +} + |