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.
This commit is contained in:
Jim Nelson 2014-10-31 17:11:36 -07:00
parent 1ee017bade
commit 4a0c3e1199

View file

@ -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);
}
/**