summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 08:22:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 08:22:43 +0000
commit14dfdb5eaf2f4004fa0b08b0a1888e40e1ba5bc4 (patch)
tree4beb8cf8aaf6a2f68d7eb2c5fac7889b1da8a50c /dir.c
parent66564ab6b2d5a4d223573a13e39c9fdf21127cab (diff)
dir.c: use built-in encoding indexes
* internal.h: add UTF8-MAC. * dir.c (rb_utf8mac_encoding): use built-in encoding indexes in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index 4781175..8a172d7 100644
--- a/dir.c
+++ b/dir.c
@@ -91,9 +91,7 @@ char *strchr(char*,char);
rb_encoding *
rb_utf8mac_encoding(void)
{
- static rb_encoding *utf8mac;
- if (!utf8mac) utf8mac = rb_enc_find("UTF8-MAC");
- return utf8mac;
+ return rb_enc_from_index(ENCINDEX_UTF8_MAC);
}
static inline int