From 5a647a3f5fd011f8558c7f9e90cd65e70e73eb40 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 9 Jun 2008 09:25:32 +0000 Subject: * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc. * *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- encoding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'encoding.c') diff --git a/encoding.c b/encoding.c index b1fc140ad9..0928b4b2b0 100644 --- a/encoding.c +++ b/encoding.c @@ -533,9 +533,7 @@ enc_check_capable(VALUE x) ID rb_id_encoding(void) { - if (!id_encoding) { - id_encoding = rb_intern("encoding"); - } + CONST_ID(id_encoding, "encoding"); return id_encoding; } @@ -1162,6 +1160,8 @@ rb_enc_aliases(VALUE klass) void Init_Encoding(void) { +#undef rb_intern + id_base_encoding = rb_intern("#base_encoding"); rb_cEncoding = rb_define_class("Encoding", rb_cObject); -- cgit v1.2.3