* string.c (search_nonascii): Use VALUE instead of unsigned long

because VALUE can be the fastest unsigned integer type.
  On LLP64 unsigned long isn't the fastest.
* string.c (str_strlen): ditto.
* string.c (str_utf8_nth): ditto.
* string.c (count_utf8_lead_bytes_with_ulong): ditto.

* string.c (count_utf8_lead_bytes_with_word): renamed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-03-08 09:05:34 +00:00
parent b7d7519b18
commit a39feece85
4 changed files with 49 additions and 38 deletions

View file

@ -819,6 +819,8 @@ class TestM17N < Test::Unit::TestCase
assert_equal("\u{3044}", s[27])
assert_equal("\u{3046}", s[28])
assert_equal("\u{3048}", s[29])
s = "abcdefghijklmnopqrstuvw\u{3042 3044 3046 3048 304A}"
assert_equal("\u{3044}", s[24])
end
def test_str_aref_len