diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-15 05:49:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-15 05:49:52 +0000 |
commit | af0294b30e92980ca15a11471784c50938f4bbaf (patch) | |
tree | b2b1324cc04e04f9eed297f2bfd9192d88bffb2c /enc/utf_8.c | |
parent | 3b2a54a9c3941f7f7575574c5ee63625fd64e086 (diff) | |
download | ruby-af0294b30e92980ca15a11471784c50938f4bbaf.tar.gz |
enc: fundamental encindex
* enc/{ascii,us_ascii,utf_8}.c: set encoding indexes of
fundamental built-in encodings so that usable as well as
allocated rb_encoding before rb_enc_init().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/utf_8.c')
-rw-r--r-- | enc/utf_8.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/enc/utf_8.c b/enc/utf_8.c index 8ab8792a6d..ae5258dae2 100644 --- a/enc/utf_8.c +++ b/enc/utf_8.c @@ -28,6 +28,10 @@ */ #include "regenc.h" +#include "encindex.h" +#ifndef ENCINDEX_UTF_8 +#define ENCINDEX_UTF_8 0 +#endif #define USE_INVALID_CODE_SCHEME @@ -424,7 +428,7 @@ OnigEncodingDefine(utf_8, UTF_8) = { get_ctype_code_range, left_adjust_char_head, onigenc_always_true_is_allowed_reverse_match, - 0, + ENCINDEX_UTF_8, ONIGENC_FLAG_UNICODE, }; ENC_ALIAS("CP65001", "UTF-8") |