]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Write c:type="void" when name="none"
authorJean Pierre Dudey <me@jeandudey.tech>
Sun, 19 Jul 2020 23:34:36 +0000 (18:34 -0500)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 26 Jul 2020 10:29:34 +0000 (12:29 +0200)
This is to match g-ir-scanner behaviour of using the c:type to
identify void return value.

codegen/valagirwriter.vala

index 90f2836fa1046e6ff91aaf2db2454bba827f112f..28063d24827d047db57def9a82b53b5aa32ddbbe 100644 (file)
@@ -1558,7 +1558,7 @@ public class Vala.GIRWriter : CodeVisitor {
                        buffer.append_printf ("</array>\n");
                } else if (type is VoidType) {
                        write_indent ();
-                       buffer.append_printf ("<type name=\"none\"/>\n");
+                       buffer.append_printf ("<type name=\"none\" c:type=\"void\"/>\n");
                } else if (type is PointerType) {
                        write_indent ();
                        buffer.append_printf ("<type name=\"gpointer\" c:type=\"%s%s\"/>\n", get_ccode_name (type), direction == ParameterDirection.IN ? "" : "*");