[vala] GIR writer: Avoid generating parameters tag if not necessary
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [vala] GIR writer: Avoid generating parameters tag if not necessary
- Date: Thu, 30 Apr 2009 16:09:02 -0400 (EDT)
commit c151c53e622c7b7af62018cf61b044235a85c2da
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Fri Mar 20 17:27:55 2009 +0100
GIR writer: Avoid generating parameters tag if not necessary
Signed-off-by: Didier 'Ptitjes <ptitjes free fr>
---
gobject/valagirwriter.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gobject/valagirwriter.vala b/gobject/valagirwriter.vala
index a1eb3a2..c4ed73d 100644
--- a/gobject/valagirwriter.vala
+++ b/gobject/valagirwriter.vala
@@ -360,6 +360,10 @@ public class Vala.GIRWriter : CodeVisitor {
}
private void write_params (Gee.List<FormalParameter> params, DataType? instance_type = null) {
+ if (params.size == 0 && instance_type == null) {
+ return;
+ }
+
write_indent ();
stream.printf ("<parameters>\n");
indent++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]