]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
generate unique names for wrapper methods, fixes bug 529251
authorJuerg Billeter <j@bitron.ch>
Mon, 21 Apr 2008 19:57:39 +0000 (19:57 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 21 Apr 2008 19:57:39 +0000 (19:57 +0000)
2008-04-21  Juerg Billeter  <j@bitron.ch>

* vala/valadynamicmethod.vala: generate unique names for wrapper
  methods, fixes bug 529251

svn path=/trunk/; revision=1298

ChangeLog
vala/valadynamicmethod.vala

index 1c6fcf67754e8043a505a4e0509cd62b7f7dbaf5..10c60cf77e97f6364e12752ee29501ff360c1b94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-21  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valadynamicmethod.vala: generate unique names for wrapper
+         methods, fixes bug 529251
+
 2008-04-21  Jürg Billeter  <j@bitron.ch>
 
        * vapi/packages/libglade-2.0/: fix glade_xml_construct binding,
index d63146c34fe011a78712471805d68baf14c6a985..054ba1e79a7449d34333a7513bac1e55955de3b4 100644 (file)
@@ -32,6 +32,7 @@ public class Vala.DynamicMethod : Method {
        public InvocationExpression invocation { get; set; }
 
        private string cname;
+       static int dynamic_method_id;
 
        public DynamicMethod (DataType dynamic_type, string name, DataType return_type, SourceReference? source_reference = null) {
                this.dynamic_type = dynamic_type;
@@ -47,8 +48,7 @@ public class Vala.DynamicMethod : Method {
        public override string get_default_cname () {
                // return cname of wrapper method
                if (cname == null) {
-                       // FIXME support multiple dynamic methods with the same name
-                       cname = "_dynamic_%s".printf (name);
+                       cname = "_dynamic_%s%d".printf (name, dynamic_method_id++);
                }
                return cname;
        }