diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-02-24 13:45:18 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-02-24 13:45:18 +0100 |
commit | 87d66947248c5010062d6ee2a2b87f1ba92a93bb (patch) | |
tree | 4fb840902dc9db97f2981f08b280980830e20d26 /tests/basic-types | |
parent | 612bded4642734554b7658c64d90ec1c3336006d (diff) | |
download | vala-87d66947248c5010062d6ee2a2b87f1ba92a93bb.tar.gz |
codegen: Emit G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC() for structs
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1293
Diffstat (limited to 'tests/basic-types')
-rw-r--r-- | tests/basic-types/bug622178.c-expected | 2 | ||||
-rw-r--r-- | tests/basic-types/garray.c-expected | 1 | ||||
-rw-r--r-- | tests/basic-types/gvariants-unboxing-safe.c-expected | 1 | ||||
-rw-r--r-- | tests/basic-types/gvariants.c-expected | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/tests/basic-types/bug622178.c-expected b/tests/basic-types/bug622178.c-expected index e227298b5..a8b9cefed 100644 --- a/tests/basic-types/bug622178.c-expected +++ b/tests/basic-types/bug622178.c-expected @@ -57,6 +57,7 @@ VALA_EXTERN void foo_free (Foo* self); VALA_EXTERN void foo_copy (const Foo* self, Foo* dest); VALA_EXTERN void foo_destroy (Foo* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Foo, foo_destroy) static guint8* _vala_array_dup1 (guint8* self, gssize length); VALA_EXTERN GType bar_get_type (void) G_GNUC_CONST ; @@ -65,6 +66,7 @@ VALA_EXTERN void bar_free (Bar* self); VALA_EXTERN void bar_copy (const Bar* self, Bar* dest); VALA_EXTERN void bar_destroy (Bar* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Bar, bar_destroy) static guint8* _vala_array_dup2 (guint8* self, gssize length); VALA_EXTERN GType manam_get_type (void) G_GNUC_CONST ; diff --git a/tests/basic-types/garray.c-expected b/tests/basic-types/garray.c-expected index 07713ca1a..636562418 100644 --- a/tests/basic-types/garray.c-expected +++ b/tests/basic-types/garray.c-expected @@ -71,6 +71,7 @@ VALA_EXTERN void foo_struct_free (FooStruct* self); VALA_EXTERN void foo_struct_copy (const FooStruct* self, FooStruct* dest); VALA_EXTERN void foo_struct_destroy (FooStruct* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (FooStruct, foo_struct_destroy) VALA_EXTERN void test_garray (void); static void _g_object_unref0_ (gpointer var); static void _vala_Foo_free_function_content_of (gpointer data); diff --git a/tests/basic-types/gvariants-unboxing-safe.c-expected b/tests/basic-types/gvariants-unboxing-safe.c-expected index 0867cdfb6..2c8c4e8a4 100644 --- a/tests/basic-types/gvariants-unboxing-safe.c-expected +++ b/tests/basic-types/gvariants-unboxing-safe.c-expected @@ -39,6 +39,7 @@ VALA_EXTERN void foo_free (Foo* self); VALA_EXTERN void foo_copy (const Foo* self, Foo* dest); VALA_EXTERN void foo_destroy (Foo* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Foo, foo_destroy) static void _vala_main (void); static gboolean* _bool_dup (gboolean* self); static gboolean* _variant_get1 (GVariant* value); diff --git a/tests/basic-types/gvariants.c-expected b/tests/basic-types/gvariants.c-expected index 0b8d1d0e3..8d4cfdd79 100644 --- a/tests/basic-types/gvariants.c-expected +++ b/tests/basic-types/gvariants.c-expected @@ -79,6 +79,7 @@ VALA_EXTERN void foo_free (Foo* self); VALA_EXTERN void foo_copy (const Foo* self, Foo* dest); VALA_EXTERN void foo_destroy (Foo* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Foo, foo_destroy) VALA_EXTERN void struct_conversion (void); static GVariant* _variant_new8 (Foo value); static void _variant_get8 (GVariant* value, |