[vala/0.36] girwriter: Write glib-type attributes for Enums/Structs with type_id
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] girwriter: Write glib-type attributes for Enums/Structs with type_id
- Date: Thu, 6 Dec 2018 15:03:21 +0000 (UTC)
commit 581051f2bad1825e6bc9e780fa735e5dbb817712
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Nov 18 20:37:38 2018 +0100
girwriter: Write glib-type attributes for Enums/Structs with type_id
codegen/valagirwriter.vala | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 7e7b7edd3..7caeae0c4 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -471,6 +471,11 @@ public class Vala.GIRWriter : CodeVisitor {
write_indent ();
buffer.append_printf ("<record name=\"%s\"", get_gir_name (st));
+ if (CCodeBaseModule.get_ccode_has_type_id (st)) {
+ write_gtype_attributes (st);
+ } else {
+ write_ctype_attributes (st);
+ }
write_symbol_attributes (st);
buffer.append_printf (">\n");
indent++;
@@ -661,7 +666,11 @@ public class Vala.GIRWriter : CodeVisitor {
write_indent ();
buffer.append_printf ("<%s name=\"%s\"", element_name, get_gir_name (en));
- write_gtype_attributes (en);
+ if (CCodeBaseModule.get_ccode_has_type_id (en)) {
+ write_gtype_attributes (en);
+ } else {
+ write_ctype_attributes (en);
+ }
write_symbol_attributes (en);
buffer.append_printf (">\n");
indent++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]