diff --git a/ChangeLog b/ChangeLog index 06bdf232a5..470a259df8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Feb 16 11:53:35 2008 Tanaka Akira + + * encoding.c (rb_enc_strlen): moved to string.c. + + * string.c (rb_enc_strlen): use search_nonascii. + (str_strlen): don't use search_nonascii. + Sat Feb 16 11:45:31 2008 Tanaka Akira * lib/require_relative.rb: check require_relative call in eval. diff --git a/encoding.c b/encoding.c index 5a8369b6f3..da89d8ac70 100644 --- a/encoding.c +++ b/encoding.c @@ -720,23 +720,6 @@ rb_obj_encoding(VALUE obj) return rb_enc_from_encoding(enc); } -long -rb_enc_strlen(const char *p, const char *e, rb_encoding *enc) -{ - long c; - - if (rb_enc_mbmaxlen(enc) == rb_enc_mbminlen(enc)) { - return (e - p) / rb_enc_mbminlen(enc); - } - - for (c=0; p