]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not use string.replace
authorJürg Billeter <j@bitron.ch>
Fri, 5 Feb 2010 06:58:15 +0000 (07:58 +0100)
committerJürg Billeter <j@bitron.ch>
Fri, 5 Feb 2010 07:00:45 +0000 (08:00 +0100)
GRegex requires GLib 2.14.

vala/valasymbol.vala

index d852906992ea2ac42edc5b3eb0263b71e93f90ab..231eacea6706e5eebb88e27e11b814063e90ad71 100644 (file)
@@ -1,6 +1,6 @@
 /* valasymbol.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -163,7 +163,11 @@ public abstract class Vala.Symbol : CodeNode {
                        return name;
                }
 
-               return "%s.%s".printf (parent_symbol.get_full_name (), name.replace (".", ""));
+               if (name.has_prefix (".")) {
+                       return "%s%s".printf (parent_symbol.get_full_name (), name);
+               } else {
+                       return "%s.%s".printf (parent_symbol.get_full_name (), name);
+               }
        }
 
        /**