summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 05:07:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 05:07:37 +0000
commit3f07e548fc8b1247824a008c970fcbcf10116a93 (patch)
tree320e1d9d957c765c52412e7b2be9cfe45110561c
parent5a41626dea072a4493984f05ba3aa032919da70d (diff)
* include/ruby/encoding.h (ENC_CODERANGE_VALID): rename from
ENC_CODERANGE_8BIT. * string.c (rb_enc_str_coderange): follow the renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--include/ruby/encoding.h2
-rw-r--r--string.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 149f8ea160..7c8932510c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Dec 17 14:03:39 2007 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/encoding.h (ENC_CODERANGE_VALID): rename from
+ ENC_CODERANGE_8BIT.
+
+ * string.c (rb_enc_str_coderange): follow the renaming.
+
Mon Dec 17 13:56:53 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (tr_find): wrong condition fixed.
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 4816e80fd2..eb27dfb625 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -27,7 +27,7 @@
#define ENC_CODERANGE_MASK (FL_USER12|FL_USER13)
#define ENC_CODERANGE_UNKNOWN 0
#define ENC_CODERANGE_7BIT FL_USER12
-#define ENC_CODERANGE_8BIT FL_USER13
+#define ENC_CODERANGE_VALID FL_USER13
#define ENC_CODERANGE_BROKEN (FL_USER12|FL_USER13)
#define ENC_CODERANGE(obj) (RBASIC(obj)->flags & ENC_CODERANGE_MASK)
#define ENC_CODERANGE_ASCIIONLY(obj) (ENC_CODERANGE(obj) == ENC_CODERANGE_7BIT)
diff --git a/string.c b/string.c
index 62ade2ae54..5eea404054 100644
--- a/string.c
+++ b/string.c
@@ -106,7 +106,7 @@ rb_enc_str_coderange(VALUE str)
rb_encoding *enc = rb_enc_get(str);
if (!rb_enc_asciicompat(enc)) {
- cr = ENC_CODERANGE_8BIT;
+ cr = ENC_CODERANGE_VALID;
ENC_CODERANGE_SET(str, cr);
return cr;
}
@@ -119,7 +119,7 @@ rb_enc_str_coderange(VALUE str)
int c = (unsigned char)*p;
if (!rb_enc_isascii(c, enc)) {
- cr = ENC_CODERANGE_8BIT;
+ cr = ENC_CODERANGE_VALID;
break;
}
p++;