From: Jean Pierre Dudey Date: Sun, 19 Jul 2020 23:34:36 +0000 (-0500) Subject: girwriter: Write c:type="void" when name="none" X-Git-Tag: 0.46.12~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20534e837d62e32c84e6abc62e13533d5cf9376f;p=thirdparty%2Fvala.git 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. --- diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala index 299900bc7..a2d170c9d 100644 --- a/codegen/valagirwriter.vala +++ b/codegen/valagirwriter.vala @@ -1561,7 +1561,7 @@ public class Vala.GIRWriter : CodeVisitor { buffer.append_printf ("\n"); } else if (type is VoidType) { write_indent (); - buffer.append_printf ("\n"); + buffer.append_printf ("\n"); } else if (type is PointerType) { write_indent (); buffer.append_printf ("\n", get_ccode_name (type), direction == ParameterDirection.IN ? "" : "*"); diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected index 3a4c7665a..0860e81fe 100644 --- a/tests/girwriter/GirTest-1.0.gir-expected +++ b/tests/girwriter/GirTest-1.0.gir-expected @@ -53,7 +53,7 @@ - + @@ -175,7 +175,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -225,12 +225,12 @@ - + - + @@ -240,7 +240,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -270,12 +270,12 @@ - + - + @@ -288,7 +288,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -316,7 +316,7 @@ - + @@ -331,7 +331,7 @@ - + @@ -358,7 +358,7 @@ - + @@ -397,7 +397,7 @@ - + @@ -424,7 +424,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -529,7 +529,7 @@ - + @@ -539,7 +539,7 @@ - + @@ -552,7 +552,7 @@ - + @@ -562,7 +562,7 @@ - + @@ -575,7 +575,7 @@ - + @@ -585,7 +585,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -630,7 +630,7 @@ - + @@ -643,22 +643,22 @@ - + - + - + - + @@ -668,7 +668,7 @@ - + @@ -681,7 +681,7 @@ - + @@ -694,7 +694,7 @@ - + @@ -715,7 +715,7 @@ - + @@ -725,7 +725,7 @@ - + @@ -735,7 +735,7 @@ - + @@ -745,7 +745,7 @@ - + @@ -761,7 +761,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -794,7 +794,7 @@ - + @@ -809,7 +809,7 @@ - + @@ -830,7 +830,7 @@ - + @@ -848,7 +848,7 @@ - + @@ -860,7 +860,7 @@ - + @@ -880,7 +880,7 @@ - + @@ -890,7 +890,7 @@ - + @@ -900,7 +900,7 @@ - + @@ -910,7 +910,7 @@ - + @@ -920,7 +920,7 @@ - + @@ -930,7 +930,7 @@ - + @@ -940,17 +940,17 @@ - + - + - + @@ -963,7 +963,7 @@ - + @@ -976,7 +976,7 @@ - + @@ -992,7 +992,7 @@ - + @@ -1002,7 +1002,7 @@ - + @@ -1018,7 +1018,7 @@ - + @@ -1034,7 +1034,7 @@ - + @@ -1049,7 +1049,7 @@ - + @@ -1064,7 +1064,7 @@ - + @@ -1079,7 +1079,7 @@ - + @@ -1091,7 +1091,7 @@ - + @@ -1109,7 +1109,7 @@ - + @@ -1130,7 +1130,7 @@ - + @@ -1301,7 +1301,7 @@ - + @@ -1343,7 +1343,7 @@ - + @@ -1401,7 +1401,7 @@ - + @@ -1411,7 +1411,7 @@ - + @@ -1421,7 +1421,7 @@ - + @@ -1434,7 +1434,7 @@ - + @@ -1444,7 +1444,7 @@ - + @@ -1457,7 +1457,7 @@ - + @@ -1467,7 +1467,7 @@ - + @@ -1480,7 +1480,7 @@ - + @@ -1493,7 +1493,7 @@ - + @@ -1509,7 +1509,7 @@ - + @@ -1519,7 +1519,7 @@ - + @@ -1535,7 +1535,7 @@ - + @@ -1558,7 +1558,7 @@ - + @@ -1568,7 +1568,7 @@ - + @@ -1584,7 +1584,7 @@ - + @@ -1599,7 +1599,7 @@ - + @@ -1617,7 +1617,7 @@ - + @@ -1632,7 +1632,7 @@ - + @@ -1650,7 +1650,7 @@ - + @@ -1671,7 +1671,7 @@ - + @@ -1698,7 +1698,7 @@ - + @@ -1732,7 +1732,7 @@ - + @@ -1742,7 +1742,7 @@ - + @@ -1752,7 +1752,7 @@ - + @@ -1762,7 +1762,7 @@ - + @@ -1828,7 +1828,7 @@ - +