]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GIR writer: Do not use string.replace
authorJürg Billeter <j@bitron.ch>
Tue, 5 May 2009 16:40:03 +0000 (18:40 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 5 May 2009 16:40:42 +0000 (18:40 +0200)
GRegex requires GLib 2.14.

gobject/valagirwriter.vala

index 2dfc4092294521df32a93942e4e4130e887f9092..63e9c3135d58a93c0b4ba23bd19f5220a2465574 100644 (file)
@@ -824,7 +824,8 @@ public class Vala.GIRWriter : CodeVisitor {
        }
 
        private string camel_case_to_canonical (string name) {
-               return Symbol.camel_case_to_lower_case (name).replace ("_", "-");
+               string[] parts = Symbol.camel_case_to_lower_case (name).split ("_");
+               return string.joinv ("-", parts);
        }
 
        private bool check_accessibility (Symbol sym) {