[vala/wip/error-gtype: 193/197] 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: 193/197] codegen: Default to "has_type_id = false" for external error-domains
- Date: Tue, 21 Jan 2020 12:43:28 +0000 (UTC)
commit 51fec0aa2a274f01c5f091a636d6f65ac862da63
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 c8dfb167c..1a323bfae 100644
--- a/codegen/valaccode.vala
+++ b/codegen/valaccode.vala
@@ -436,7 +436,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]