From c3c58513d7ebb2c8396cf195b804bfc3e16e4871 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 28 Dec 2007 06:10:49 +0000 Subject: [PATCH] * encoding.c (set_base_encoding, enc_base_encoding): renamed based_encoding as base_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ encoding.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06ae0b5890..4493748245 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Dec 28 15:10:47 2007 Nobuyoshi Nakada + + * encoding.c (set_base_encoding, enc_base_encoding): renamed + based_encoding as base_encoding. + Fri Dec 28 13:57:49 2007 NAKAMURA Usaku * golf_prelude.rb (Integer#each): use alias simply. diff --git a/encoding.c b/encoding.c index 2e8b9b54ea..3070af55ac 100644 --- a/encoding.c +++ b/encoding.c @@ -18,7 +18,7 @@ #include #endif -static ID id_encoding, id_based_encoding; +static ID id_encoding, id_base_encoding; static VALUE rb_cEncoding; struct rb_encoding_entry { @@ -205,11 +205,11 @@ enc_check_duplication(const char *name) } static VALUE -set_based_encoding(int index, rb_encoding *based) +set_base_encoding(int index, rb_encoding *base) { VALUE enc = rb_enc_from_encoding(enc_table[index].enc); - rb_ivar_set(enc, id_based_encoding, rb_enc_from_encoding(based)); + rb_ivar_set(enc, id_base_encoding, rb_enc_from_encoding(base)); return enc; } @@ -221,7 +221,7 @@ rb_enc_replicate(const char *name, rb_encoding *encoding) enc_check_duplication(name); if (enc_table_expand(index + 1) < 0) return -1; enc_register_at(index, name, encoding); - set_based_encoding(index, encoding); + set_base_encoding(index, encoding); return index; } @@ -237,7 +237,7 @@ rb_define_dummy_encoding(const char *name) if (enc_table_expand(index + 1) < 0) return -1; encoding = rb_ascii8bit_encoding(); enc_register_at(index, name, encoding); - enc = set_based_encoding(index, encoding); + enc = set_base_encoding(index, encoding); FL_SET(enc, ENC_DUMMY); return index; } @@ -729,9 +729,9 @@ enc_name(VALUE self) } static VALUE -enc_based_encoding(VALUE self) +enc_base_encoding(VALUE self) { - return rb_attr_get(self, id_based_encoding); + return rb_attr_get(self, id_base_encoding); } /* @@ -973,14 +973,14 @@ Init_Encoding(void) { int i; - id_based_encoding = rb_intern("#based_encoding"); + id_base_encoding = rb_intern("#base_encoding"); rb_cEncoding = rb_define_class("Encoding", rb_cObject); rb_undef_alloc_func(rb_cEncoding); rb_define_method(rb_cEncoding, "to_s", enc_name, 0); rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0); rb_define_method(rb_cEncoding, "name", enc_name, 0); - rb_define_method(rb_cEncoding, "based_encoding", enc_based_encoding, 0); + rb_define_method(rb_cEncoding, "base_encoding", enc_base_encoding, 0); rb_define_method(rb_cEncoding, "dummy?", enc_dummy_p, 0); rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0); rb_define_singleton_method(rb_cEncoding, "find", enc_find, 1);