diff options
Diffstat (limited to 'tests/methods/parameter-out-free-on-error.c-expected')
-rw-r--r-- | tests/methods/parameter-out-free-on-error.c-expected | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/methods/parameter-out-free-on-error.c-expected b/tests/methods/parameter-out-free-on-error.c-expected index db888bd11..18e4fcc18 100644 --- a/tests/methods/parameter-out-free-on-error.c-expected +++ b/tests/methods/parameter-out-free-on-error.c-expected @@ -14,6 +14,8 @@ #endif #endif +#define TYPE_FOO_ERROR (foo_error_get_type ()) + #define TYPE_MANAM (manam_get_type ()) #define MANAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MANAM, Manam)) #define MANAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MANAM, ManamClass)) @@ -39,6 +41,7 @@ typedef enum { FOO_ERROR_FAIL } FooError; #define FOO_ERROR foo_error_quark () + struct _Manam { GObject parent_instance; ManamPrivate * priv; @@ -51,6 +54,7 @@ struct _ManamClass { static gpointer manam_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); +GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType manam_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Manam, g_object_unref) VALA_EXTERN Manam* manam_new (void); @@ -70,6 +74,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_FAIL, "FOO_ERROR_FAIL", "fail"}, {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; +} + Manam* manam_construct (GType object_type) { |