new_struct = g_slice_new (GIMarshallingTestsBoxedStruct);
*new_struct = *struct_;
+ new_struct->string_ = g_strdup (struct_->string_);
return new_struct;
}
static void
gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruct *struct_)
{
- if (struct_ != NULL)
+ if (struct_ != NULL) {
+ g_free (struct_->string_);
g_slice_free (GIMarshallingTestsBoxedStruct, struct_);
+ }
}
GType
struct_ = g_new(GIMarshallingTestsBoxedStruct, 1);
struct_->long_ = 42;
+ struct_->string_ = g_strdup("hello");
struct_->g_strv = g_new0(gchar*, 4);
struct_->g_strv[0] = g_strdup("0");
struct_->g_strv[1] = g_strdup("1");
struct _GIMarshallingTestsBoxedStruct {
glong long_;
+ gchar *string_;
GStrv g_strv;
};
struct _GIMarshallingTestsInterface3Iface {
GTypeInterface base_iface;
-
+
/**
* GIMarshallingTestsInterface3::test_variant_array_in:
* @in: (in) (array length=n_in):
gfloat some_float;
gdouble some_double;
gchar **some_strv;
- GIMarshallingTestsBoxedStruct* some_boxed_struct;
+ GIMarshallingTestsBoxedStruct* some_boxed_struct;
GVariant *some_variant;
};