summaryrefslogtreecommitdiff
path: root/vala/valadynamicmethod.vala
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2008-04-21 19:57:39 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-04-21 19:57:39 +0000
commit24bbce461ba132cdc2fcf97ca8586cd4e38910bf (patch)
treead71eddfacdcdc832c8f38289af7516556bc94d5 /vala/valadynamicmethod.vala
parenta75a8f7c83c4c287b28587cea7043914fe4a6fd4 (diff)
downloadvala-24bbce461ba132cdc2fcf97ca8586cd4e38910bf.tar.gz
generate unique names for wrapper methods, fixes bug 529251
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
Diffstat (limited to 'vala/valadynamicmethod.vala')
-rw-r--r--vala/valadynamicmethod.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/vala/valadynamicmethod.vala b/vala/valadynamicmethod.vala
index d63146c34..054ba1e79 100644
--- a/vala/valadynamicmethod.vala
+++ b/vala/valadynamicmethod.vala
@@ -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;
}