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 | 75a1d33bcfe767724e883737da9c9d5c3a031e17 (patch) | |
tree | b2b1324cc04e04f9eed297f2bfd9192d88bffb2c /enc/ascii.c | |
parent | 078b6c98383ed2acb912866f4ac2b47e86cd0805 (diff) |
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/ascii.c')
-rw-r--r-- | enc/ascii.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/enc/ascii.c b/enc/ascii.c index 72150c037c..4fdc976e12 100644 --- a/enc/ascii.c +++ b/enc/ascii.c @@ -29,6 +29,10 @@ */ #include "regenc.h" +#include "encindex.h" +#ifndef ENCINDEX_ASCII +#define ENCINDEX_ASCII 0 +#endif OnigEncodingDefine(ascii, ASCII) = { onigenc_single_byte_mbc_enc_len, @@ -47,7 +51,7 @@ OnigEncodingDefine(ascii, ASCII) = { onigenc_not_support_get_ctype_code_range, onigenc_single_byte_left_adjust_char_head, onigenc_always_true_is_allowed_reverse_match, - 0, + ENCINDEX_ASCII, ONIGENC_FLAG_NONE, }; ENC_ALIAS("BINARY", "ASCII-8BIT") |