java-gobject-introspection r36 - trunk/src/org/gnome/gir/compiler
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: java-gobject-introspection r36 - trunk/src/org/gnome/gir/compiler
- Date: Fri, 5 Sep 2008 22:20:16 +0000 (UTC)
Author: walters
Date: Fri Sep 5 22:20:15 2008
New Revision: 36
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=36&view=rev
Log:
On constructor clashes if one ends in _new, it wins
Modified:
trunk/src/org/gnome/gir/compiler/CodeFactory.java
Modified: trunk/src/org/gnome/gir/compiler/CodeFactory.java
==============================================================================
--- trunk/src/org/gnome/gir/compiler/CodeFactory.java (original)
+++ trunk/src/org/gnome/gir/compiler/CodeFactory.java Fri Sep 5 22:20:15 2008
@@ -881,8 +881,18 @@
compileConstructor(info, compilation, first);
} else {
logger.info("Constructor name " + first.getSymbol() + " clashes");
+ FunctionInfo defaultCtor = null;
for (FunctionInfo ctor : ctorGroup) {
- compileStaticConstructor(info, compilation, ctor);
+ if (ctor.getName().equals("new"))
+ defaultCtor = ctor;
+ }
+ if (defaultCtor != null) {
+ compileConstructor(info, compilation, defaultCtor);
+ }
+ for (FunctionInfo ctor : ctorGroup) {
+ if (ctor != defaultCtor) {
+ compileStaticConstructor(info, compilation, ctor);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]