[vala/wip/error-gtype: 149/154] codegen: Default to "has_type_id = false" for external error-domains
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/error-gtype: 149/154] codegen: Default to "has_type_id = false" for external error-domains
- Date: Wed, 23 Feb 2022 15:33:51 +0000 (UTC)
commit 9ae44ffae1350e773122267b37e66c21ad3f2ebf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Oct 3 16:50:16 2019 +0200
codegen: Default to "has_type_id = false" for external error-domains
codegen/valaccode.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valaccode.vala b/codegen/valaccode.vala
index 9b1da33f7..80e0f1c0f 100644
--- a/codegen/valaccode.vala
+++ b/codegen/valaccode.vala
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]