зеркало из https://github.com/github/ruby.git
ext/nkf/nkf.c follow previous rb_ascii_encoding renaming.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5b809a28f8
Коммит
38c303bb52
|
@ -1,7 +1,7 @@
|
|||
Sun Dec 23 08:42:51 2007 Tanaka Akira <akr@fsij.org>
|
||||
Sun Dec 23 09:07:02 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,
|
||||
ruby.c, transcode.c: rename rb_ascii_encoding. to
|
||||
ruby.c, transcode.c, ext/nkf/nkf.c: rename rb_ascii_encoding. to
|
||||
rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with
|
||||
ASCII-8BIT and US-ASCII.
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ rb_encoding* rb_nkf_enc_get(const char *name)
|
|||
nkf_native_encoding * nkf_base_enc = nkf_enc_to_base_encoding(nkf_enc);
|
||||
idx = rb_enc_find_index(nkf_enc_name(nkf_base_enc));
|
||||
if (idx < 0) {
|
||||
idx = rb_enc_replicate(name, rb_ascii_encoding());
|
||||
idx = rb_enc_replicate(name, rb_ascii8bit_encoding());
|
||||
} else {
|
||||
rb_encoding *rb_enc = rb_enc_from_index(idx);
|
||||
idx = rb_enc_replicate(name, rb_enc);
|
||||
|
@ -485,7 +485,7 @@ Init_nkf()
|
|||
rb_define_const(mNKF, "NOCONV", Qnil);
|
||||
rb_define_const(mNKF, "UNKNOWN", Qnil);
|
||||
rb_define_const(mNKF, "BINARY", rb_enc_from_encoding(rb_nkf_enc_get("BINARY")));
|
||||
rb_define_const(mNKF, "ASCII", rb_enc_from_encoding(rb_ascii_encoding()));
|
||||
rb_define_const(mNKF, "ASCII", rb_enc_from_encoding(rb_ascii8bit_encoding()));
|
||||
rb_define_const(mNKF, "JIS", rb_enc_from_encoding(rb_nkf_enc_get("ISO-2022-JP")));
|
||||
rb_define_const(mNKF, "EUC", rb_enc_from_encoding(rb_nkf_enc_get("EUC-JP")));
|
||||
rb_define_const(mNKF, "SJIS", rb_enc_from_encoding(rb_nkf_enc_get("Shift_JIS")));
|
||||
|
|
Загрузка…
Ссылка в новой задаче