From: Rico Tzschichholz Date: Wed, 21 Jun 2023 09:06:16 +0000 (+0200) Subject: codegen: Add missing EXTERN flag for GType function of error domains X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83d66f14eca60fe11dfa25f4e7f1bbab497933c9;p=thirdparty%2Fvala.git codegen: Add missing EXTERN flag for GType function of error domains In addition to da4ff03c5ca427cf7cc4574f52f5190dc1b0dfb9 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1448 --- diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala index 2b4c6cf85..ec74ac025 100644 --- a/codegen/valagerrormodule.vala +++ b/codegen/valagerrormodule.vala @@ -78,6 +78,9 @@ public class Vala.GErrorModule : CCodeDelegateModule { regfun.modifiers |= CCodeModifiers.STATIC | CCodeModifiers.UNUSED; } else if (context.hide_internal && edomain.is_internal_symbol ()) { regfun.modifiers |= CCodeModifiers.INTERNAL; + } else { + regfun.modifiers |= CCodeModifiers.EXTERN; + requires_vala_extern = true; } decl_space.add_function_declaration (regfun); diff --git a/tests/asynchronous/bug793158.c-expected b/tests/asynchronous/bug793158.c-expected index 3eda4d0d1..568808045 100644 --- a/tests/asynchronous/bug793158.c-expected +++ b/tests/asynchronous/bug793158.c-expected @@ -64,7 +64,7 @@ VALA_EXTERN GMainLoop* loop; GMainLoop* loop = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Foo, g_object_unref) static void foo_bar_data_free (gpointer _data); diff --git a/tests/asynchronous/catch-error-scope.c-expected b/tests/asynchronous/catch-error-scope.c-expected index 7ed244639..ca170c102 100644 --- a/tests/asynchronous/catch-error-scope.c-expected +++ b/tests/asynchronous/catch-error-scope.c-expected @@ -52,7 +52,7 @@ struct _Block1Data { }; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; static void foo_data_free (gpointer _data); VALA_EXTERN void foo (GAsyncReadyCallback _callback_, gpointer _user_data_); diff --git a/tests/asynchronous/catch-in-finally.c-expected b/tests/asynchronous/catch-in-finally.c-expected index 136fdf2af..51cc38e86 100644 --- a/tests/asynchronous/catch-in-finally.c-expected +++ b/tests/asynchronous/catch-in-finally.c-expected @@ -80,7 +80,7 @@ VALA_EXTERN GMainLoop* loop; GMainLoop* loop = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; static void fail_data_free (gpointer _data); VALA_EXTERN void fail (GAsyncReadyCallback _callback_, gpointer _user_data_); diff --git a/tests/asynchronous/out-parameter-free-on-error.c-expected b/tests/asynchronous/out-parameter-free-on-error.c-expected index 63de3571e..e4f1c1cf6 100644 --- a/tests/asynchronous/out-parameter-free-on-error.c-expected +++ b/tests/asynchronous/out-parameter-free-on-error.c-expected @@ -85,7 +85,7 @@ VALA_EXTERN GMainLoop* loop; GMainLoop* loop = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN 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); diff --git a/tests/basic-types/default-gtype.c-expected b/tests/basic-types/default-gtype.c-expected index 31c08607a..d86f52393 100644 --- a/tests/basic-types/default-gtype.c-expected +++ b/tests/basic-types/default-gtype.c-expected @@ -80,7 +80,7 @@ static GType ifoo_get_type_once (void); VALA_EXTERN GType foo_enum_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType foo_flag_get_type (void) G_GNUC_CONST ; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType foo_struct_get_type (void) G_GNUC_CONST ; VALA_EXTERN FooStruct* foo_struct_dup (const FooStruct* self); VALA_EXTERN void foo_struct_free (FooStruct* self); diff --git a/tests/control-flow/bug764440.c-expected b/tests/control-flow/bug764440.c-expected index 82c107821..708fdb76c 100644 --- a/tests/control-flow/bug764440.c-expected +++ b/tests/control-flow/bug764440.c-expected @@ -24,7 +24,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN const gchar* get_bar (GError** error); static void _vala_main (void); diff --git a/tests/control-flow/lock-if-throw.c-expected b/tests/control-flow/lock-if-throw.c-expected index 4debb0d7b..41a1db0eb 100644 --- a/tests/control-flow/lock-if-throw.c-expected +++ b/tests/control-flow/lock-if-throw.c-expected @@ -59,7 +59,7 @@ static gint Foo_private_offset; static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN gpointer foo_ref (gpointer instance); VALA_EXTERN void foo_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_foo (const gchar* name, diff --git a/tests/dbus/errors_client.c-expected b/tests/dbus/errors_client.c-expected index ce075f67f..f46e68784 100644 --- a/tests/dbus/errors_client.c-expected +++ b/tests/dbus/errors_client.c-expected @@ -55,7 +55,7 @@ struct _TestIface { }; VALA_EXTERN GQuark test_error_quark (void); -GType test_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType test_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType test_proxy_get_type (void) G_GNUC_CONST ; VALA_EXTERN guint test_register_object (void* object, GDBusConnection* connection, diff --git a/tests/dbus/errors_server.c-expected b/tests/dbus/errors_server.c-expected index 4a6145849..f4be548ab 100644 --- a/tests/dbus/errors_server.c-expected +++ b/tests/dbus/errors_server.c-expected @@ -64,7 +64,7 @@ VALA_EXTERN GMainLoop* main_loop; GMainLoop* main_loop = NULL; VALA_EXTERN GQuark test_error_quark (void); -GType test_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType test_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType test_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Test, g_object_unref) VALA_EXTERN guint test_register_object (void* object, diff --git a/tests/delegates/error-pos.c-expected b/tests/delegates/error-pos.c-expected index bd789b87e..e3fe75761 100644 --- a/tests/delegates/error-pos.c-expected +++ b/tests/delegates/error-pos.c-expected @@ -62,7 +62,7 @@ struct _ParamSpecBar { static gpointer bar_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN gpointer bar_ref (gpointer instance); VALA_EXTERN void bar_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_bar (const gchar* name, diff --git a/tests/delegates/params-array-with-throws.c-expected b/tests/delegates/params-array-with-throws.c-expected index 7c35f290f..cf775e3ae 100644 --- a/tests/delegates/params-array-with-throws.c-expected +++ b/tests/delegates/params-array-with-throws.c-expected @@ -30,7 +30,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void foo (GError** error, gchar* _first_array, ...); diff --git a/tests/delegates/variadic.c-expected b/tests/delegates/variadic.c-expected index cb3a55b50..93a2540b1 100644 --- a/tests/delegates/variadic.c-expected +++ b/tests/delegates/variadic.c-expected @@ -35,7 +35,7 @@ typedef enum { #define BAZ_ERROR baz_error_quark () VALA_EXTERN GQuark baz_error_quark (void); -GType baz_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType baz_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void foo (const gchar* first, ...); VALA_EXTERN void baz (const gchar* first, diff --git a/tests/errors/bug567181.c-expected b/tests/errors/bug567181.c-expected index baca926f5..23b5b8680 100644 --- a/tests/errors/bug567181.c-expected +++ b/tests/errors/bug567181.c-expected @@ -58,7 +58,7 @@ static gpointer foo_parent_class = NULL; VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Foo, g_object_unref) VALA_EXTERN GQuark error_quark (void); -GType error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType error_get_type (void) G_GNUC_CONST ; VALA_EXTERN Foo* foo_new (GError** error); VALA_EXTERN Foo* foo_construct (GType object_type, GError** error); diff --git a/tests/errors/bug579101.c-expected b/tests/errors/bug579101.c-expected index 613275723..4a565c5f8 100644 --- a/tests/errors/bug579101.c-expected +++ b/tests/errors/bug579101.c-expected @@ -29,7 +29,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void do_foo (gint* i); VALA_EXTERN gchar* do_bar (gint* i); VALA_EXTERN gchar* do_manam (gint* i); diff --git a/tests/errors/bug623049.c-expected b/tests/errors/bug623049.c-expected index 0fa60e091..493922b93 100644 --- a/tests/errors/bug623049.c-expected +++ b/tests/errors/bug623049.c-expected @@ -76,7 +76,7 @@ static gpointer cls_a_parent_class = NULL; static gpointer cls_b_parent_class = NULL; VALA_EXTERN GQuark foo_quark (void); -GType foo_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType cls_a_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClsA, g_object_unref) VALA_EXTERN ClsA* cls_a_new (GError** error); diff --git a/tests/errors/bug778224.c-expected b/tests/errors/bug778224.c-expected index f9d2d0063..63ee3c3d0 100644 --- a/tests/errors/bug778224.c-expected +++ b/tests/errors/bug778224.c-expected @@ -30,7 +30,7 @@ VALA_EXTERN gboolean true; gboolean true = TRUE; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN Foo foo (GError** error); static void _vala_main (void); diff --git a/tests/errors/catch-error-code.c-expected b/tests/errors/catch-error-code.c-expected index 31b722cfd..3017833a9 100644 --- a/tests/errors/catch-error-code.c-expected +++ b/tests/errors/catch-error-code.c-expected @@ -23,7 +23,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; static void _vala_main (void); GQuark diff --git a/tests/errors/catch-in-finally.c-expected b/tests/errors/catch-in-finally.c-expected index da1a05707..20fd21b9f 100644 --- a/tests/errors/catch-in-finally.c-expected +++ b/tests/errors/catch-in-finally.c-expected @@ -29,7 +29,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void fail (GError** error); VALA_EXTERN void may_fail (GError** error); VALA_EXTERN void foo (GError** error); diff --git a/tests/errors/default-gtype.c-expected b/tests/errors/default-gtype.c-expected index c3996c42d..ea80af1f9 100644 --- a/tests/errors/default-gtype.c-expected +++ b/tests/errors/default-gtype.c-expected @@ -26,7 +26,7 @@ typedef enum { #define FOO foo_quark () VALA_EXTERN GQuark foo_quark (void); -GType foo_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; static void _vala_main (void); GQuark diff --git a/tests/errors/delegate-throws-error-code.c-expected b/tests/errors/delegate-throws-error-code.c-expected index 03ea9e7b5..fbd503898 100644 --- a/tests/errors/delegate-throws-error-code.c-expected +++ b/tests/errors/delegate-throws-error-code.c-expected @@ -24,7 +24,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; static void _vala_main (void); static void _vala_lambda0_ (GError** error); static void __vala_lambda0__foo_func (gpointer self, diff --git a/tests/errors/errorcode.c-expected b/tests/errors/errorcode.c-expected index 196f82742..31fb99267 100644 --- a/tests/errors/errorcode.c-expected +++ b/tests/errors/errorcode.c-expected @@ -30,7 +30,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void bar (gint code); static void _vala_main (void); diff --git a/tests/errors/errordomain-static-method.c-expected b/tests/errors/errordomain-static-method.c-expected index 03febe1e5..8accd231e 100644 --- a/tests/errors/errordomain-static-method.c-expected +++ b/tests/errors/errordomain-static-method.c-expected @@ -29,7 +29,7 @@ typedef enum { #define FOO foo_quark () VALA_EXTERN GQuark foo_quark (void); -GType foo_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; VALA_EXTERN GError* foo_from_string (const gchar* _error_); static void _vala_main (void); diff --git a/tests/errors/errordomain.c-expected b/tests/errors/errordomain.c-expected index 17777ea6f..44830a8da 100644 --- a/tests/errors/errordomain.c-expected +++ b/tests/errors/errordomain.c-expected @@ -22,7 +22,7 @@ typedef enum { #define FOO foo_quark () VALA_EXTERN GQuark foo_quark (void); -GType foo_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; static void _vala_main (void); GQuark diff --git a/tests/errors/errors.c-expected b/tests/errors/errors.c-expected index c0c278a80..0cdb4637d 100644 --- a/tests/errors/errors.c-expected +++ b/tests/errors/errors.c-expected @@ -55,7 +55,7 @@ struct _BarClass { static gpointer bar_parent_class = NULL; VALA_EXTERN GQuark bar_error_quark (void); -GType bar_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType bar_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType bar_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Bar, g_object_unref) VALA_EXTERN void bar_foo (Bar* self, diff --git a/tests/errors/loops.c-expected b/tests/errors/loops.c-expected index 93da0082b..13d62d2d0 100644 --- a/tests/errors/loops.c-expected +++ b/tests/errors/loops.c-expected @@ -25,7 +25,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN gchar** get_array (gint* result_length1, GError** error); VALA_EXTERN gboolean get_bool (GError** error); diff --git a/tests/errors/method-throws-error-code.c-expected b/tests/errors/method-throws-error-code.c-expected index e575f8bd4..7d25eee8d 100644 --- a/tests/errors/method-throws-error-code.c-expected +++ b/tests/errors/method-throws-error-code.c-expected @@ -23,7 +23,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void foo (GError** error); static void _vala_main (void); diff --git a/tests/errors/unhandled.c-expected b/tests/errors/unhandled.c-expected index a3f7899bf..d6233a28b 100644 --- a/tests/errors/unhandled.c-expected +++ b/tests/errors/unhandled.c-expected @@ -52,7 +52,7 @@ struct _FooClass { static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ; G_DEFINE_AUTOPTR_CLEANUP_FUNC (Foo, g_object_unref) VALA_EXTERN Foo* foo_new (void); diff --git a/tests/genie/exception.c-expected b/tests/genie/exception.c-expected index 686c1d930..beefcd57e 100644 --- a/tests/genie/exception.c-expected +++ b/tests/genie/exception.c-expected @@ -29,7 +29,7 @@ typedef enum { static void _vala_main (gchar** args, gint args_length1); VALA_EXTERN GQuark test_error_quark (void); -GType test_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType test_error_get_type (void) G_GNUC_CONST ; static void _vala_main (gchar** args, diff --git a/tests/methods/bug781061.c-expected b/tests/methods/bug781061.c-expected index 164c13bf3..e7dc26bcf 100644 --- a/tests/methods/bug781061.c-expected +++ b/tests/methods/bug781061.c-expected @@ -25,7 +25,7 @@ typedef enum { #define FOO_ERROR foo_error_quark () VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void print_something_throws (gboolean ok, const gchar* format, GError** error, diff --git a/tests/methods/parameter-out-free-on-error.c-expected b/tests/methods/parameter-out-free-on-error.c-expected index 47db7df6c..be82cae0f 100644 --- a/tests/methods/parameter-out-free-on-error.c-expected +++ b/tests/methods/parameter-out-free-on-error.c-expected @@ -54,7 +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 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); diff --git a/tests/methods/params-array-with-throws.c-expected b/tests/methods/params-array-with-throws.c-expected index 0a51e6d36..39365ed9a 100644 --- a/tests/methods/params-array-with-throws.c-expected +++ b/tests/methods/params-array-with-throws.c-expected @@ -60,7 +60,7 @@ struct _ParamSpecFoo { static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN void foo (GError** error, const gchar* _first_array, ...); diff --git a/tests/methods/print-attribute.c-expected b/tests/methods/print-attribute.c-expected index 5dc66e9a0..e4acf5016 100644 --- a/tests/methods/print-attribute.c-expected +++ b/tests/methods/print-attribute.c-expected @@ -60,7 +60,7 @@ struct _ParamSpecFoo { static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN gpointer foo_ref (gpointer instance); VALA_EXTERN void foo_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_foo (const gchar* name, diff --git a/tests/objects/property-error.c-expected b/tests/objects/property-error.c-expected index 9aca938be..a106b510a 100644 --- a/tests/objects/property-error.c-expected +++ b/tests/objects/property-error.c-expected @@ -101,7 +101,7 @@ static gint Foo_private_offset; static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; VALA_EXTERN gpointer bar_ref (gpointer instance); VALA_EXTERN void bar_unref (gpointer instance); VALA_EXTERN GParamSpec* param_spec_bar (const gchar* name, diff --git a/tests/objects/signals-error-marshal.c-expected b/tests/objects/signals-error-marshal.c-expected index b7dd80eb1..014ed6d8a 100644 --- a/tests/objects/signals-error-marshal.c-expected +++ b/tests/objects/signals-error-marshal.c-expected @@ -70,7 +70,7 @@ struct _FooClass { static gpointer foo_parent_class = NULL; VALA_EXTERN GQuark foo_error_quark (void); -GType foo_error_get_type (void) G_GNUC_CONST ; +VALA_EXTERN GType foo_error_get_type (void) G_GNUC_CONST ; 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);