[geary/geary-0.8] Build with Vala 0.22.1 (ASCII string binding issue): Bug #739470



commit b8d6c8cd4fec30b6dfbcb86d910df6ee4f5ccdc4
Author: Jim Nelson <jim yorba org>
Date:   Fri Oct 31 17:11:36 2014 -0700

    Build with Vala 0.22.1 (ASCII string binding issue): Bug #739470
    
    ASCII strup/strdown not bound in Vala 0.22 or 0.24, so need to use
    externs to import those symbols until Vala 0.26 is the minimum
    requirement.

 src/engine/util/util-ascii.vala |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/util/util-ascii.vala b/src/engine/util/util-ascii.vala
index 3be9dba..971eb5b 100644
--- a/src/engine/util/util-ascii.vala
+++ b/src/engine/util/util-ascii.vala
@@ -4,6 +4,11 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
+// These calls are bound to the string class in Vala 0.26.  When that version of Vala is the
+// minimum, these can be dropped and Ascii.strup and Ascii.strdown can use the string methods.
+extern string g_ascii_strup(string str, ssize_t len = -1);
+extern string g_ascii_strdown(string str, ssize_t len = -1);
+
 namespace Geary.Ascii {
 
 public int index_of(string str, char ch) {
@@ -82,11 +87,11 @@ public uint nullable_stri_hash(string? str) {
 }
 
 public string strdown(string str) {
-    return str.ascii_down();
+    return g_ascii_strdown(str);
 }
 
 public string strup(string str) {
-    return str.ascii_up();
+    return g_ascii_strup(str);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]