[gobject-introspection] Add test function regress_test_struct_fixed_array_frob



commit ae61a2341fad68876cf208cf497cbda221e951e3
Author: Colin Walters <walters verbum org>
Date:   Wed May 4 15:41:53 2011 -0400

    Add test function regress_test_struct_fixed_array_frob

 tests/scanner/regress.c |   10 ++++++++++
 tests/scanner/regress.h |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 3ed9a86..a2fb90f 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -2929,3 +2929,13 @@ void regress_aliased_caller_alloc (RegressAliasedTestBoxed *boxed)
   boxed->priv = g_slice_new0 (RegressTestBoxedPrivate);
   boxed->priv->magic = 0xdeadbeef;
 }
+
+void
+regress_test_struct_fixed_array_frob (RegressTestStructFixedArray *str)
+{
+  guint i;
+  str->just_int = 7;
+
+  for (i = 0; i < G_N_ELEMENTS(str->array); i++)
+    str->array[i] = 42 + i;
+}
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index 5937fa5..4133396 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -614,6 +614,8 @@ typedef struct {
   gint array[10];
 } RegressTestStructFixedArray;
 
+void regress_test_struct_fixed_array_frob (RegressTestStructFixedArray *str);
+
 #define REGRESS_UTF8_CONSTANT "const \xe2\x99\xa5 utf8"
 
 #endif /* __GITESTTYPES_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]