[vala] girwriter: Make sure the default constructor is called new
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] girwriter: Make sure the default constructor is called new
- Date: Wed, 2 Sep 2009 11:58:25 +0000 (UTC)
commit 0e46471a2bb443ed6f7918ff6b530e8c0d5996d9
Author: John Carr <john carr unrouted co uk>
Date: Wed Sep 2 12:57:45 2009 +0100
girwriter: Make sure the default constructor is called new
codegen/valagirwriter.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 98b2af2..25ced90 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -615,7 +615,13 @@ public class Vala.GIRWriter : CodeVisitor {
}
write_indent ();
- stream.printf ("<constructor name=\"%s\" c:identifier=\"%s\"", m.name, m.get_cname ());
+
+ if (m == ((Class)m.parent_symbol).default_construction_method) {
+ stream.printf ("<constructor name=\"new\" c:identifier=\"%s\"", m.get_cname ());
+ } else {
+ stream.printf ("<constructor name=\"%s\" c:identifier=\"%s\"", m.name, m.get_cname ());
+ }
+
if (m.tree_can_fail) {
stream.printf (" throws=\"1\"");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]