summaryrefslogtreecommitdiffstats
path: root/encoding.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:25:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:25:32 +0000
commita37463ef14409c81422b3c3d6c35a0dbd21f51b7 (patch)
tree294dcb47e83e5480b1fa992aba8a4b4025c8a626 /encoding.c
parent32a51c5c95dde9e78161cccc9e75303a5523540b (diff)
downloadruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.tar.gz
ruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.tar.xz
ruby-a37463ef14409c81422b3c3d6c35a0dbd21f51b7.zip
* include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc.
* *.c: no cache in init functions. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/encoding.c b/encoding.c
index b1fc140ad..0928b4b2b 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);