[vala/0.48] girwriter: Write missing c:type attribute of compact class record



commit 18374ed41f4f269d411f32a162fc46ad8b2933c7
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Aug 10 14:03:08 2021 +0200

    girwriter: Write missing c:type attribute of compact class record
    
    Thanks to Niels De Graef

 codegen/valagirwriter.vala               | 1 +
 tests/girwriter/GirTest-1.0.gir-expected | 4 ++--
 tests/girwriter/girtest.vapigen-expected | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index d2129f432..027a606ac 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -596,6 +596,7 @@ public class Vala.GIRWriter : CodeVisitor {
                } else {
                        write_indent ();
                        buffer.append_printf ("<record name=\"%s\"", get_gir_name (cl));
+                       write_ctype_attributes (cl);
                        write_symbol_attributes (cl);
                        buffer.append_printf (">\n");
                        indent++;
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index 2f65002eb..6b6942e14 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -1726,7 +1726,7 @@
                </field>
        </record>
        <record name="ImplementionTestPrivate" c:type="GirTestImplementionTestPrivate" disguised="1"/>
-       <record name="CompactClass">
+       <record name="CompactClass" c:type="GirTestCompactClass">
                <field name="s" writable="1">
                        <type name="utf8" c:type="gchar*"/>
                </field>
@@ -1805,7 +1805,7 @@
                </field>
        </record>
        <record name="RenamedClassPrivate" c:type="GirTestNamedClassPrivate" disguised="1"/>
-       <record name="RenamedCompactClass">
+       <record name="RenamedCompactClass" c:type="GirTestNamedCompactClass">
                <field name="s" writable="1">
                        <type name="utf8" c:type="gchar*"/>
                </field>
diff --git a/tests/girwriter/girtest.vapigen-expected b/tests/girwriter/girtest.vapigen-expected
index f60fe6264..583c1d1fa 100644
--- a/tests/girwriter/girtest.vapigen-expected
+++ b/tests/girwriter/girtest.vapigen-expected
@@ -194,7 +194,7 @@ namespace GirTest {
                public int field_name;
                public void inv ();
        }
-       [CCode (cheader_filename = "girtest.h", has_type_id = false)]
+       [CCode (cheader_filename = "girtest.h", cname = "GirTestNamedCompactClass", has_type_id = false)]
        public struct RenamedCompactClass {
                public weak string s;
                public int i;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]