From c46078fa430bfcc25c26f33da991410372d44d03 Mon Sep 17 00:00:00 2001 From: Val Och Date: Fri, 31 Dec 2021 20:25:49 +0300 Subject: 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+. --- tests/methods/bug771964.c-expected | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/methods/bug771964.c-expected') diff --git a/tests/methods/bug771964.c-expected b/tests/methods/bug771964.c-expected index 13a74c4e8..74f16bb9a 100644 --- a/tests/methods/bug771964.c-expected +++ b/tests/methods/bug771964.c-expected @@ -158,13 +158,13 @@ foo_get_type_once (void) GType foo_get_type (void) { - static volatile gsize foo_type_id__volatile = 0; - if (g_once_init_enter (&foo_type_id__volatile)) { + static volatile gsize foo_type_id__once = 0; + if (g_once_init_enter (&foo_type_id__once)) { GType foo_type_id; foo_type_id = foo_get_type_once (); - g_once_init_leave (&foo_type_id__volatile, foo_type_id); + g_once_init_leave (&foo_type_id__once, foo_type_id); } - return foo_type_id__volatile; + return foo_type_id__once; } static void @@ -221,13 +221,13 @@ bar_get_type_once (void) GType bar_get_type (void) { - static volatile gsize bar_type_id__volatile = 0; - if (g_once_init_enter (&bar_type_id__volatile)) { + static volatile gsize bar_type_id__once = 0; + if (g_once_init_enter (&bar_type_id__once)) { GType bar_type_id; bar_type_id = bar_get_type_once (); - g_once_init_leave (&bar_type_id__volatile, bar_type_id); + g_once_init_leave (&bar_type_id__once, bar_type_id); } - return bar_type_id__volatile; + return bar_type_id__once; } static gint -- cgit v1.2.1