summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-09-02 15:13:29 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-09-02 18:59:06 +0200
commit0753d2eb6bd6dae2b6b12a349b16b51b881a5ca7 (patch)
treed72186f70d4e537cf8790946ec7ac707354f2d9d /vala
parente451fd7d38c0d93fd209782ed7ac07222d2e2418 (diff)
downloadvala-0753d2eb6bd6dae2b6b12a349b16b51b881a5ca7.tar.gz
Don't use locale dependent string functions on syntax strings
Replace usage of string.down() with string.ascii_down(), and string.up() with string.ascii_up() Fixes https://gitlab.gnome.org/GNOME/vala/issues/1067
Diffstat (limited to 'vala')
-rw-r--r--vala/valaenumvalue.vala2
-rw-r--r--vala/valasymbol.vala2
2 files changed, 2 insertions, 2 deletions
diff --git a/vala/valaenumvalue.vala b/vala/valaenumvalue.vala
index e0129d2a7..7a98afb67 100644
--- a/vala/valaenumvalue.vala
+++ b/vala/valaenumvalue.vala
@@ -34,7 +34,7 @@ public class Vala.EnumValue : Constant {
if (_nick == null) {
_nick = get_attribute_string ("Description", "nick");
if (_nick == null) {
- _nick = name.down ().replace ("_", "-");
+ _nick = name.ascii_down ().replace ("_", "-");
}
}
return _nick;
diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala
index 5ce7b389c..770212d47 100644
--- a/vala/valasymbol.vala
+++ b/vala/valasymbol.vala
@@ -252,7 +252,7 @@ public abstract class Vala.Symbol : CodeNode {
public static string camel_case_to_lower_case (string camel_case) {
if ("_" in camel_case) {
// do not insert additional underscores if input is not real camel case
- return camel_case.down ();
+ return camel_case.ascii_down ();
}
var result_builder = new StringBuilder ("");