]> 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 09:11:30 +0000 (11:11 +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 3eda4d0d1da099a1700560e1df862a85c229c077..568808045b5328529d7acb0c4c075c4906848c47 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 7ed244639532b94067d26c4b4c3999cd40546a01..ca170c102bbe1b91eff862754a000e5db013aeb0 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 136fdf2af65a23c1139d79722fcd751f1050f476..51cc38e868405d132be1ea8d172d2b66de5a1fb2 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 63de3571e6b6862f5c65fb8c8b30129a2b9448c9..e4f1c1cf6f8635e5779f983ba30ab37b5049e255 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 31c08607a5deb9d9e413acc534628884a18df40e..d86f523931d37a1741c4cfc8da88aaa9bd637bf8 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 82c10782116a517e795eb31b1baa969910740328..708fdb76caf975ff850ac2475e9b3c53708361da 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 4debb0d7b29fc7bc55665761dc1dc4c147ecb30c..41a1db0eb7cfac7c412c6202cc6c378970094446 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 ce075f67f6bd78ec66d668a5daf9005df06d32ea..f46e68784e470886aa45bb2470c62983d02c324d 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 4a6145849aaee2c088e450f8e2f4166f8636ddeb..f4be548abdac3ec1fb8c07d9df8139564679f460 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 bd789b87e015d443aa3e1e342172b4f95f03ff17..e3fe75761354ad58d6e4a06225b88c81c7895b93 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 7c35f290f47c1dd6b22a22be3232c0e8bcf0b0ac..cf775e3ae2768ca83c4697399d8f546a16407693 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 cb3a55b50284de4f0e6f50f31c073dccbf94b20b..93a2540b187ba1b8044a20e7804da3dbd789456b 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 baca926f58d7e13834a0e0aa9b9685f337651ac5..23b5b8680ef06b6502c2c56683172eabeb501b5c 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 613275723113076746749a435a201a3275610ca7..4a565c5f892605a0275a402beb1112343ffcf900 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 0fa60e091ec0880cdf496f27318b37b05f31a7cd..493922b93a3f06e86a2925578251f46b9ddb5c3d 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 f9d2d0063da6eda4991bd647aee7c2b96b394896..63ee3c3d09d5478495bb6ec208bdd31b18e6ca9e 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 31b722cfd2ca2cf12ec700639fb476c8274c7759..3017833a9b3f96eeeb7035f17672ad52030630ec 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 da1a05707625ce659616a1bb2413367f72931900..20fd21b9f622072313372283c6d2989f1ef8bb62 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 c3996c42d4629a90ecd9bacaacbf7632105dca80..ea80af1f9d9c1a9514c2405786d4b95eb457697f 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 03ea9e7b5c28fccbda7f42dfd0950a396e6f9804..fbd5038985ff0daa26f40860a2159ca74c5b4615 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 _vala_lambda0_ (GError** error);
 static void __vala_lambda0__foo_func (gpointer self,
index 196f82742ef27735d70293af7ac8dc759ffecf8b..31fb99267a1ddc853f7e49a82552ea326e91ad69 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 03febe1e523972dcfce6a7044ccfe7bb711af3c5..8accd231ef3f1b9fa4d52294f64472aa5d93ef5f 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 17777ea6fcae59377e913799326ebc79b6fc4f11..44830a8dab003978e4316be7f8ea2b8dbe743bce 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 c0c278a802965958669c03c7150b00efb3509ea3..0cdb4637d0a9bfb03cfa7789083d1505aa8f61d8 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 93da0082b5a8b9a7f1fd1611a34e611066196710..13d62d2d01721eda2a261108f39cb752a7cfe4c3 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 e575f8bd4805a0fb1d57d4eb197b41ad0e001211..7d25eee8d1d78973c71d3cef862d9edabbd3bd5b 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 a3f7899bfb143b1f8f3c8d8e8158d2c126051367..d6233a28bef1de08ef69d83957d529e83c4ec27e 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 686c1d930bd6aaaf1ed40313e7e0ac616f821c3b..beefcd57e1aadc9bfe4f962586569dd29ac99ed0 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 164c13bf3cf59d1abd6512704614a98119a9e7a1..e7dc26bcf23774d03de966a27e7ecf1214f3d568 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 47db7df6cf016c75ae72185a4643d83d1403f945..be82cae0f2d3522715ce84525a385f517c7eb50e 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 0a51e6d363529c55fa9d0d74a63eec5ea9a8e548..39365ed9a30f1eae40c3949f9aa55a8b525bf78a 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 5dc66e9a037fff42e3b72c9a3ced8c3aaaa480e2..e4acf5016a156311f58cc279bcb049b6c0a53107 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 9aca938bef07fdf52da2fe080f03b9ac84917047..a106b510a1dbc38a9af138957320b91be23467f2 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 b7dd80eb19aebd717653b264443add4a6e60832a..014ed6d8a515e809259d5fca4ed3da47ae292631 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);