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/structs | |
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/structs')
-rw-r--r-- | tests/structs/bug530605.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/bug596144.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/bug606202.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/bug660426.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/bug688732.c-expected | 2 | ||||
-rw-r--r-- | tests/structs/bug775761.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/cast-struct-boxed.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/constructor-params-array.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/constructor-variadic.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/properties.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/struct-base-types.c-expected | 2 | ||||
-rw-r--r-- | tests/structs/struct-boxed-cast.c-expected | 1 | ||||
-rw-r--r-- | tests/structs/struct-initializer-list-in-array.c-expected | 2 | ||||
-rw-r--r-- | tests/structs/struct-initializer-list-nested.c-expected | 2 | ||||
-rw-r--r-- | tests/structs/structs.c-expected | 1 |
15 files changed, 19 insertions, 0 deletions
diff --git a/tests/structs/bug530605.c-expected b/tests/structs/bug530605.c-expected index 36d036036..ad65d7af3 100644 --- a/tests/structs/bug530605.c-expected +++ b/tests/structs/bug530605.c-expected @@ -36,6 +36,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 foo_init (Foo *self, gint bar, const gchar* baz); diff --git a/tests/structs/bug596144.c-expected b/tests/structs/bug596144.c-expected index eed540bf7..deb852946 100644 --- a/tests/structs/bug596144.c-expected +++ b/tests/structs/bug596144.c-expected @@ -33,6 +33,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 gpointer diff --git a/tests/structs/bug606202.c-expected b/tests/structs/bug606202.c-expected index eb909283e..9bfe67888 100644 --- a/tests/structs/bug606202.c-expected +++ b/tests/structs/bug606202.c-expected @@ -71,6 +71,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 foo_init (Foo *self, const gchar* s); VALA_EXTERN gpointer bar_ref (gpointer instance); diff --git a/tests/structs/bug660426.c-expected b/tests/structs/bug660426.c-expected index 7aec498f7..79459ede5 100644 --- a/tests/structs/bug660426.c-expected +++ b/tests/structs/bug660426.c-expected @@ -34,6 +34,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 gint* _vala_array_dup1 (gint* self, gssize length); static void _vala_main (void); diff --git a/tests/structs/bug688732.c-expected b/tests/structs/bug688732.c-expected index c5bd3e224..74232f52e 100644 --- a/tests/structs/bug688732.c-expected +++ b/tests/structs/bug688732.c-expected @@ -30,12 +30,14 @@ 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 GType bar_get_type (void) G_GNUC_CONST ; VALA_EXTERN Bar* bar_dup (const Bar* self); 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 void _vala_main (void); void diff --git a/tests/structs/bug775761.c-expected b/tests/structs/bug775761.c-expected index f6843cc0a..811f86265 100644 --- a/tests/structs/bug775761.c-expected +++ b/tests/structs/bug775761.c-expected @@ -38,6 +38,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 _foo_equal (const Foo * s1, const Foo * s2); diff --git a/tests/structs/cast-struct-boxed.c-expected b/tests/structs/cast-struct-boxed.c-expected index 78a2891cb..23472fd1a 100644 --- a/tests/structs/cast-struct-boxed.c-expected +++ b/tests/structs/cast-struct-boxed.c-expected @@ -54,6 +54,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) VALA_EXTERN Bar* bar_heap_owned (void); VALA_EXTERN Bar* bar_heap_unowned (void); VALA_EXTERN void test_with_destroy (void); diff --git a/tests/structs/constructor-params-array.c-expected b/tests/structs/constructor-params-array.c-expected index cf1b5e63c..d60648f81 100644 --- a/tests/structs/constructor-params-array.c-expected +++ b/tests/structs/constructor-params-array.c-expected @@ -35,6 +35,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 foo_init (Foo *self, const gchar* _first_strv, ...); diff --git a/tests/structs/constructor-variadic.c-expected b/tests/structs/constructor-variadic.c-expected index 243135c61..696f35bba 100644 --- a/tests/structs/constructor-variadic.c-expected +++ b/tests/structs/constructor-variadic.c-expected @@ -35,6 +35,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 foo_init (Foo *self, const gchar* first_arg, ...); diff --git a/tests/structs/properties.c-expected b/tests/structs/properties.c-expected index 305ce0ca4..16cc2b654 100644 --- a/tests/structs/properties.c-expected +++ b/tests/structs/properties.c-expected @@ -36,6 +36,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 gint foo_get_i (Foo* self); VALA_EXTERN void foo_set_i (Foo* self, gint value); diff --git a/tests/structs/struct-base-types.c-expected b/tests/structs/struct-base-types.c-expected index 6b12fe36d..7bbaaf579 100644 --- a/tests/structs/struct-base-types.c-expected +++ b/tests/structs/struct-base-types.c-expected @@ -37,12 +37,14 @@ 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 GType bar_get_type (void) G_GNUC_CONST ; VALA_EXTERN Bar* bar_dup (const Bar* self); 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 void _vala_main (void); void diff --git a/tests/structs/struct-boxed-cast.c-expected b/tests/structs/struct-boxed-cast.c-expected index ebaa0fb62..6b351221a 100644 --- a/tests/structs/struct-boxed-cast.c-expected +++ b/tests/structs/struct-boxed-cast.c-expected @@ -40,6 +40,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 void _vala_main (void); void diff --git a/tests/structs/struct-initializer-list-in-array.c-expected b/tests/structs/struct-initializer-list-in-array.c-expected index 5c5d2e572..5158e3d76 100644 --- a/tests/structs/struct-initializer-list-in-array.c-expected +++ b/tests/structs/struct-initializer-list-in-array.c-expected @@ -48,11 +48,13 @@ 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) VALA_EXTERN Foo* foo_dup (const Foo* self); 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 gboolean* _vala_array_dup1 (gboolean* self, gssize length); static void _vala_main (void); diff --git a/tests/structs/struct-initializer-list-nested.c-expected b/tests/structs/struct-initializer-list-nested.c-expected index d1aabef1a..274d1ec6c 100644 --- a/tests/structs/struct-initializer-list-nested.c-expected +++ b/tests/structs/struct-initializer-list-nested.c-expected @@ -62,12 +62,14 @@ 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) VALA_EXTERN GType manam_get_type (void) G_GNUC_CONST ; VALA_EXTERN Manam* manam_dup (const Manam* self); VALA_EXTERN void manam_free (Manam* self); VALA_EXTERN void manam_copy (const Manam* self, Manam* dest); VALA_EXTERN void manam_destroy (Manam* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (Manam, manam_destroy) VALA_EXTERN GType baz_get_type (void) G_GNUC_CONST ; VALA_EXTERN Baz* baz_dup (const Baz* self); VALA_EXTERN void baz_free (Baz* self); diff --git a/tests/structs/structs.c-expected b/tests/structs/structs.c-expected index 21f15f50e..4fba50587 100644 --- a/tests/structs/structs.c-expected +++ b/tests/structs/structs.c-expected @@ -79,6 +79,7 @@ VALA_EXTERN void struct_with_func_free (StructWithFunc* self); VALA_EXTERN void struct_with_func_copy (const StructWithFunc* self, StructWithFunc* dest); VALA_EXTERN void struct_with_func_destroy (StructWithFunc* self); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (StructWithFunc, struct_with_func_destroy) VALA_EXTERN void struct_with_func_init (StructWithFunc *self, Func f, gpointer f_target, |