]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Default to "has_type_id = false" for external error-domains
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 3 Oct 2019 14:50:16 +0000 (16:50 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 24 Feb 2022 18:16:01 +0000 (19:16 +0100)
codegen/valaccode.vala

index 9b1da33f757a35dcfa3e862d0e87e6e441062069..80e0f1c0f7c4d3678dd9f195484d8d9b0cbf310f 100644 (file)
@@ -445,7 +445,11 @@ namespace Vala {
        }
 
        public static bool get_ccode_has_type_id (TypeSymbol sym) {
-               return sym.get_attribute_bool ("CCode", "has_type_id", true);
+               if (sym is ErrorDomain && sym.external_package) {
+                       return sym.get_attribute_bool ("CCode", "has_type_id", false);
+               } else {
+                       return sym.get_attribute_bool ("CCode", "has_type_id", true);
+               }
        }
 
        public static bool get_ccode_has_new_function (Method m) {