diff options
Diffstat (limited to 'tests/control-flow/bug764440.c-expected')
-rw-r--r-- | tests/control-flow/bug764440.c-expected | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/control-flow/bug764440.c-expected b/tests/control-flow/bug764440.c-expected index b49776996..e5e3b5b8a 100644 --- a/tests/control-flow/bug764440.c-expected +++ b/tests/control-flow/bug764440.c-expected @@ -2,6 +2,7 @@ * generated from control_flow_bug764440.vala, do not modify */ #include <glib.h> +#include <glib-object.h> #include <stdlib.h> #include <string.h> @@ -15,12 +16,15 @@ #endif #endif +#define TYPE_FOO_ERROR (foo_error_get_type ()) + typedef enum { FOO_ERROR_BAR } FooError; #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); +GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN const gchar* get_bar (GError** error); static void _vala_main (void); @@ -30,6 +34,27 @@ foo_error_quark (void) return g_quark_from_static_string ("foo-error-quark"); } +static GType +foo_error_get_type_once (void) +{ + static const GEnumValue values[] = {{FOO_ERROR_BAR, "FOO_ERROR_BAR", "bar"}, {0, NULL, NULL}}; + GType foo_error_type_id; + foo_error_type_id = g_enum_register_static ("FooError", values); + return foo_error_type_id; +} + +GType +foo_error_get_type (void) +{ + static volatile gsize foo_error_type_id__once = 0; + if (g_once_init_enter (&foo_error_type_id__once)) { + GType foo_error_type_id; + foo_error_type_id = foo_error_get_type_once (); + g_once_init_leave (&foo_error_type_id__once, foo_error_type_id); + } + return foo_error_type_id__once; +} + const gchar* get_bar (GError** error) { |