summaryrefslogtreecommitdiff
path: root/tests/scanner/foo.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scanner/foo.c')
-rw-r--r--tests/scanner/foo.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c
index 66b29845..a574a8ef 100644
--- a/tests/scanner/foo.c
+++ b/tests/scanner/foo.c
@@ -466,6 +466,12 @@ regress_foo_dbus_data_get_type (void)
return our_type;
}
+static RegressFooBRect *
+regress_foo_brect_copy (const RegressFooBRect *boxed)
+{
+ return (RegressFooBRect *)g_memdup (boxed, sizeof (RegressFooBRect));
+}
+
GType
regress_foo_brect_get_type (void)
{
@@ -473,11 +479,17 @@ regress_foo_brect_get_type (void)
if (our_type == 0)
our_type = g_boxed_type_register_static ("RegressFooBRect",
- (GBoxedCopyFunc) g_memdup, /* Won't work */
+ (GBoxedCopyFunc) regress_foo_brect_copy,
(GBoxedFreeFunc) g_free);
return our_type;
}
+static RegressFooBUnion *
+regress_foo_bunion_copy (const RegressFooBUnion *boxed)
+{
+ return (RegressFooBUnion *)g_memdup (boxed, sizeof (RegressFooBUnion));
+}
+
GType
regress_foo_bunion_get_type (void)
{
@@ -485,7 +497,7 @@ regress_foo_bunion_get_type (void)
if (our_type == 0)
our_type = g_boxed_type_register_static ("RegressFooBUnion",
- (GBoxedCopyFunc) g_memdup, /* Won't work */
+ (GBoxedCopyFunc) regress_foo_bunion_copy,
(GBoxedFreeFunc) g_free);
return our_type;
}