std: declared fns as pure where sensible

This commit is contained in:
Stefan Plantikow
2011-12-16 18:18:34 +01:00
parent bfbaadc694
commit 7d786318a1
5 changed files with 9 additions and 8 deletions

View File

@@ -151,16 +151,16 @@ mod icu {
#[link_name = "icuuc"]
#[abi = "cdecl"]
native mod libicu {
fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
pure fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
}
}
fn is_XID_start(c: char) -> bool {
pure fn is_XID_start(c: char) -> bool {
ret icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START)
== icu::TRUE;
}
fn is_XID_continue(c: char) -> bool {
pure fn is_XID_continue(c: char) -> bool {
ret icu::libicu::u_hasBinaryProperty(c, icu::UCHAR_XID_START)
== icu::TRUE;
}