]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Add missing EXTERN flag for GType function of error domains
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Jun 2023 09:06:16 +0000 (11:06 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Jun 2023 11:26:51 +0000 (13:26 +0200)
In addition to da4ff03c5ca427cf7cc4574f52f5190dc1b0dfb9

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1448

35 files changed:
codegen/valagerrormodule.vala
tests/asynchronous/bug793158.c-expected
tests/asynchronous/catch-error-scope.c-expected
tests/asynchronous/catch-in-finally.c-expected
tests/asynchronous/out-parameter-free-on-error.c-expected
tests/basic-types/default-gtype.c-expected
tests/control-flow/bug764440.c-expected
tests/control-flow/lock-if-throw.c-expected
tests/dbus/errors_client.c-expected
tests/dbus/errors_server.c-expected
tests/delegates/error-pos.c-expected
tests/delegates/params-array-with-throws.c-expected
tests/delegates/variadic.c-expected
tests/errors/bug567181.c-expected
tests/errors/bug579101.c-expected
tests/errors/bug623049.c-expected
tests/errors/bug778224.c-expected
tests/errors/catch-error-code.c-expected
tests/errors/catch-in-finally.c-expected
tests/errors/default-gtype.c-expected
tests/errors/delegate-throws-error-code.c-expected
tests/errors/errorcode.c-expected
tests/errors/errordomain-static-method.c-expected
tests/errors/errordomain.c-expected
tests/errors/errors.c-expected
tests/errors/loops.c-expected
tests/errors/method-throws-error-code.c-expected
tests/errors/unhandled.c-expected
tests/genie/exception.c-expected
tests/methods/bug781061.c-expected
tests/methods/parameter-out-free-on-error.c-expected
tests/methods/params-array-with-throws.c-expected
tests/methods/print-attribute.c-expected
tests/objects/property-error.c-expected
tests/objects/signals-error-marshal.c-expected

index 2b4c6cf85d267035250d17cd02d1478887d7482a..ec74ac025a1e4026755fcc69efe785c04e82bd18 100644 (file)
@@ -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);
index 8ad749607cd8787df82116674fb94926099dd72f..242de48dccf6123cb4d929bcad0d2dfa8bb33ed9 100644 (file)
@@ -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);
index 4f15904f89ae87784814253bee36166d1cade67a..c4d055f0c484c8918c624a38e0266ce4bd58dc6e 100644 (file)
@@ -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_);
index ca37912bb1402d372a70a913f575c32344c6f00e..996c154ae605e2dbe876c4cfdc76f983a0f1f3f5 100644 (file)
@@ -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_);
index a4673d0a8e79f9e81a480ef2daea438719ede946..de41c609ee59efb8a7f8795f2bbea95371976e9d 100644 (file)
@@ -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);
index 995f00be50b6cde3bda5a8ceb31bf93ae4a00e9b..2d99e950ad2e5cdd0db02317c6ab1495ce4a207b 100644 (file)
@@ -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);
index e5e3b5b8a40eff53a7f8d802de62b781e5f99b16..1b5cf751c092d36d5d4f3c8babb3af53d697f714 100644 (file)
@@ -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);
 
index 7912c9826f829b892d7139b185d0cc2c1520f883..7eedf1239e55c12e434c33830b15318f823e6c45 100644 (file)
@@ -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,
index 8f1209285f53dd0f4e3e6a126e4fa41d2c9c1abb..a7c9fdd65391167cbb4698a5b1a784ee5915a005 100644 (file)
@@ -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,
index 8406a6eabfbbc2743353b1151192c51813412052..26e66c8e1610170bbcff88ebf59636cadd4d7da1 100644 (file)
@@ -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,
index 1aa5874f1fd85d331f53e6e66dc972682a8a2e47..9a4a338f754ae6372d0ab8cbdf70df03685f689c 100644 (file)
@@ -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,
index a16e6e4f83d0527ead18c3e0c3643c98c52cc432..024eed82b7d03c7876c30581b52dbe2b3daa0a4a 100644 (file)
@@ -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,
           ...);
index 59ae4b5fe8c4683872c568c629b8fc5c64b92a48..e390cc4567cc8c98670ac42a774d7f1f739ee839 100644 (file)
@@ -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,
index 6d811473f7524ddf436e3f9a433975bfc55a26dd..b2af28b59344a39a5d50699c88e91e6db5b12a6e 100644 (file)
@@ -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);
index 0fac3fdd2e5e9893b1ddab2e790e0c2b2125cadf..ea1a7f7773ee35fffc66bb48b666d1af636406ff 100644 (file)
@@ -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);
index 403ab58afd5acfae00d659aa744d640dc0310a80..f7a79c44ae780dce03e0c7278854f23d8d0d06d4 100644 (file)
@@ -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);
index 1ebb8379a2dc381925cd9dfebecc8487e535a580..8f0e3c06d3134e24b26a5137faa4bc0d8893585c 100644 (file)
@@ -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);
 
index 7fcd6f486c1f8de26d38686e7c8e51856de48f4b..7e8c9a55f5e6d02718423bbcbe12941720860fd7 100644 (file)
@@ -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
index fadaeed6da2287f885064357b4537da74760e199..299b83db10c9dc4eabe518740871438c10ab8d7b 100644 (file)
@@ -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);
index d38b8aaf23af3ecafc0f36e5765ac4e9ea8b4290..eba50fda8633b70736d272d175546d111bc57ae2 100644 (file)
@@ -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
index fadfb48f83d90f5356255362637287e61e38ee7e..9848b053513e030e00bf90c965fd60c6db3d4fe7 100644 (file)
@@ -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 __lambda4_ (GError** error);
 static void ___lambda4__foo_func (gpointer self,
index 1e25de2fb39f3d093a450e6d137caceb465966ed..785b8565a977f55bf84a507c27dbb58e4fca8440 100644 (file)
@@ -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);
 
index 070ee2e7c60ef2d5a76794a48d855e43a9af50b4..e18a5f395fb32243949a6282f2dcaab37c44d37a 100644 (file)
@@ -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);
 
index 51d8a1f069f87cdaf4704b66974c29876e893cd0..1f18ffcdd21427a9a5bd94520423132d006bb37a 100644 (file)
@@ -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
index 25c46745ad0435a8f1a240621b04831cc1b58f0b..d7574a03d1a49d879da6b88c6aba3cbd00312098 100644 (file)
@@ -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,
index e421380133f5e346ec2b7535a642408860dc37e6..605ac4389d232e8a0f397e746b4cf8258a273337 100644 (file)
@@ -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);
index dceef5dfb2facfd5c04734c880707f0cf176f96f..90ab3eb95194f691e668b99fd1df18cc8a0bfb15 100644 (file)
@@ -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);
 
index deb2f7f3f12a45ed1b7309c5d1c5ca95eb97b88c..c5e670413d54b9afd08a31ec02c97eda72379960 100644 (file)
@@ -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);
index d75111d7f223a318d8317803aa6928479bc96b10..269d7925e6a9671043538ae1b33d8d91e573457a 100644 (file)
@@ -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,
index 352fa1e2f082f0661bc910f4c5f5cb89ac2b654a..477b8e67fe33ed900046304c9dfcf491967eb71c 100644 (file)
@@ -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,
index 18e4fcc18e5a48f332ffa55731d98866748c992f..1cd0a5cbe62d8c8a97b602c6240df0f1fec36f32 100644 (file)
@@ -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);
index 0d25797cc198bb8807d6a3033ba547b230cea076..43e3f55d65a59df1e4ff1d83a7c1fa58daedd791 100644 (file)
@@ -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,
           ...);
index d3b9ae59e66d358aa4a138fd12ef40ad13f09454..744d84bb9c8f0b33ea82f2169513c00089327caa 100644 (file)
@@ -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,
index 812eb9a061d426c61647d995fbc0e6dc6e1c7a7c..feffb48902fe864fe4c913a5d86ceff9d614add7 100644 (file)
@@ -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,
index f16ef65cdd85850ca13726245874413b716da73d..87270af12eeeb988f85747b3220ef11da04093e3 100644 (file)
@@ -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);