[vala/0.40] girwriter: Write c:type="void" when name="none"



commit b99320a5d8e1cfafce4d63ae5908dcf9c1524d74
Author: Jean Pierre Dudey <me jeandudey tech>
Date:   Sun Jul 19 18:34:36 2020 -0500

    girwriter: Write c:type="void" when name="none"
    
    This is to match g-ir-scanner behaviour of using the c:type to
    identify void return value.

 codegen/valagirwriter.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 90f2836fa..28063d248 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -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 ? "" : "*");


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