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.49.1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8fd30fd1d9ac92c6fe27abb7554b88568c21361;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 99d79b4af..51a11e8d6 100644 --- a/codegen/valagirwriter.vala +++ b/codegen/valagirwriter.vala @@ -1574,7 +1574,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 97ea48fbe..1059801ec 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 @@ - + @@ -1307,7 +1307,7 @@ - + @@ -1349,7 +1349,7 @@ - + @@ -1410,7 +1410,7 @@ - + @@ -1420,7 +1420,7 @@ - + @@ -1430,7 +1430,7 @@ - + @@ -1443,7 +1443,7 @@ - + @@ -1453,7 +1453,7 @@ - + @@ -1466,7 +1466,7 @@ - + @@ -1476,7 +1476,7 @@ - + @@ -1489,7 +1489,7 @@ - + @@ -1502,7 +1502,7 @@ - + @@ -1518,7 +1518,7 @@ - + @@ -1528,7 +1528,7 @@ - + @@ -1544,7 +1544,7 @@ - + @@ -1567,7 +1567,7 @@ - + @@ -1577,7 +1577,7 @@ - + @@ -1593,7 +1593,7 @@ - + @@ -1608,7 +1608,7 @@ - + @@ -1626,7 +1626,7 @@ - + @@ -1641,7 +1641,7 @@ - + @@ -1659,7 +1659,7 @@ - + @@ -1680,7 +1680,7 @@ - + @@ -1707,7 +1707,7 @@ - + @@ -1741,7 +1741,7 @@ - + @@ -1751,7 +1751,7 @@ - + @@ -1761,7 +1761,7 @@ - + @@ -1771,7 +1771,7 @@ - + @@ -1837,7 +1837,7 @@ - +