diff options
author | Val Och <v19930312@gmail.com> | 2021-12-31 20:25:49 +0300 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-01-03 15:00:07 +0100 |
commit | c46078fa430bfcc25c26f33da991410372d44d03 (patch) | |
tree | fbffcd3e6658663c205c1ee23ab9dc0d79ddd3cc /tests/genie | |
parent | 9adade648eacc354cc6f4cf55f00e537a58d136f (diff) | |
download | vala-c46078fa430bfcc25c26f33da991410372d44d03.tar.gz |
codegen: Use __once instead of __volatile in generated code
This better reflects purpose of relevant variables, especially
given that they aren't volatile anymore on GLib 2.68+.
Diffstat (limited to 'tests/genie')
-rw-r--r-- | tests/genie/class-abstract.c-expected | 16 | ||||
-rw-r--r-- | tests/genie/class-field.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/class-init.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/class-property.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/class-signal.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/class.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/enum-with-keyword-values.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/enum.c-expected | 8 | ||||
-rw-r--r-- | tests/genie/interface.c-expected | 16 | ||||
-rw-r--r-- | tests/genie/struct-after-class.c-expected | 16 | ||||
-rw-r--r-- | tests/genie/struct.c-expected | 8 |
11 files changed, 56 insertions, 56 deletions
diff --git a/tests/genie/class-abstract.c-expected b/tests/genie/class-abstract.c-expected index 82ab96ee1..68b860a53 100644 --- a/tests/genie/class-abstract.c-expected +++ b/tests/genie/class-abstract.c-expected @@ -330,13 +330,13 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } gpointer @@ -588,13 +588,13 @@ test2_get_type_once (void) GType test2_get_type (void) { - static volatile gsize test2_type_id__volatile = 0; - if (g_once_init_enter (&test2_type_id__volatile)) { + static volatile gsize test2_type_id__once = 0; + if (g_once_init_enter (&test2_type_id__once)) { GType test2_type_id; test2_type_id = test2_get_type_once (); - g_once_init_leave (&test2_type_id__volatile, test2_type_id); + g_once_init_leave (&test2_type_id__once, test2_type_id); } - return test2_type_id__volatile; + return test2_type_id__once; } gpointer diff --git a/tests/genie/class-field.c-expected b/tests/genie/class-field.c-expected index f591e31f4..18dbc12b5 100644 --- a/tests/genie/class-field.c-expected +++ b/tests/genie/class-field.c-expected @@ -299,13 +299,13 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } gpointer diff --git a/tests/genie/class-init.c-expected b/tests/genie/class-init.c-expected index 236a2301e..b0cf044bb 100644 --- a/tests/genie/class-init.c-expected +++ b/tests/genie/class-init.c-expected @@ -153,12 +153,12 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } diff --git a/tests/genie/class-property.c-expected b/tests/genie/class-property.c-expected index 4f66b3bfa..f936f2f7d 100644 --- a/tests/genie/class-property.c-expected +++ b/tests/genie/class-property.c-expected @@ -251,13 +251,13 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } static void diff --git a/tests/genie/class-signal.c-expected b/tests/genie/class-signal.c-expected index 6a7be85c1..281b12fdf 100644 --- a/tests/genie/class-signal.c-expected +++ b/tests/genie/class-signal.c-expected @@ -345,13 +345,13 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } gpointer diff --git a/tests/genie/class.c-expected b/tests/genie/class.c-expected index 12591d1d6..f202bc5de 100644 --- a/tests/genie/class.c-expected +++ b/tests/genie/class.c-expected @@ -284,13 +284,13 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } gpointer diff --git a/tests/genie/enum-with-keyword-values.c-expected b/tests/genie/enum-with-keyword-values.c-expected index 53c07c26a..73251008d 100644 --- a/tests/genie/enum-with-keyword-values.c-expected +++ b/tests/genie/enum-with-keyword-values.c-expected @@ -71,12 +71,12 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } diff --git a/tests/genie/enum.c-expected b/tests/genie/enum.c-expected index 6f946842e..4e82a099d 100644 --- a/tests/genie/enum.c-expected +++ b/tests/genie/enum.c-expected @@ -59,12 +59,12 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } diff --git a/tests/genie/interface.c-expected b/tests/genie/interface.c-expected index 6d2565e61..4442c24e8 100644 --- a/tests/genie/interface.c-expected +++ b/tests/genie/interface.c-expected @@ -128,13 +128,13 @@ itest_get_type_once (void) GType itest_get_type (void) { - static volatile gsize itest_type_id__volatile = 0; - if (g_once_init_enter (&itest_type_id__volatile)) { + static volatile gsize itest_type_id__once = 0; + if (g_once_init_enter (&itest_type_id__once)) { GType itest_type_id; itest_type_id = itest_get_type_once (); - g_once_init_leave (&itest_type_id__volatile, itest_type_id); + g_once_init_leave (&itest_type_id__once, itest_type_id); } - return itest_type_id__volatile; + return itest_type_id__once; } static gboolean @@ -197,12 +197,12 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } diff --git a/tests/genie/struct-after-class.c-expected b/tests/genie/struct-after-class.c-expected index 907506622..34119aa30 100644 --- a/tests/genie/struct-after-class.c-expected +++ b/tests/genie/struct-after-class.c-expected @@ -305,13 +305,13 @@ testclass_get_type_once (void) GType testclass_get_type (void) { - static volatile gsize testclass_type_id__volatile = 0; - if (g_once_init_enter (&testclass_type_id__volatile)) { + static volatile gsize testclass_type_id__once = 0; + if (g_once_init_enter (&testclass_type_id__once)) { GType testclass_type_id; testclass_type_id = testclass_get_type_once (); - g_once_init_leave (&testclass_type_id__volatile, testclass_type_id); + g_once_init_leave (&testclass_type_id__once, testclass_type_id); } - return testclass_type_id__volatile; + return testclass_type_id__once; } gpointer @@ -389,12 +389,12 @@ test_struct_get_type_once (void) GType test_struct_get_type (void) { - static volatile gsize test_struct_type_id__volatile = 0; - if (g_once_init_enter (&test_struct_type_id__volatile)) { + static volatile gsize test_struct_type_id__once = 0; + if (g_once_init_enter (&test_struct_type_id__once)) { GType test_struct_type_id; test_struct_type_id = test_struct_get_type_once (); - g_once_init_leave (&test_struct_type_id__volatile, test_struct_type_id); + g_once_init_leave (&test_struct_type_id__once, test_struct_type_id); } - return test_struct_type_id__volatile; + return test_struct_type_id__once; } diff --git a/tests/genie/struct.c-expected b/tests/genie/struct.c-expected index c7c367c87..d62aff439 100644 --- a/tests/genie/struct.c-expected +++ b/tests/genie/struct.c-expected @@ -115,12 +115,12 @@ test_get_type_once (void) GType test_get_type (void) { - static volatile gsize test_type_id__volatile = 0; - if (g_once_init_enter (&test_type_id__volatile)) { + static volatile gsize test_type_id__once = 0; + if (g_once_init_enter (&test_type_id__once)) { GType test_type_id; test_type_id = test_get_type_once (); - g_once_init_leave (&test_type_id__volatile, test_type_id); + g_once_init_leave (&test_type_id__once, test_type_id); } - return test_type_id__volatile; + return test_type_id__once; } |