1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

revert r52336 (commit miss)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-10-29 05:30:50 +00:00
parent 106f033b89
commit 56eee285be
6 changed files with 26 additions and 33 deletions

View file

@ -57,28 +57,6 @@ enum ruby_preserved_encindex {
#define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
#define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
#ifdef RUBY_ENCODING_H
#define ENC_INDEX_MASK (~(~0U<<24))
#define ENC_TO_ENCINDEX(enc) (int)((enc)->ruby_encoding_index & ENC_INDEX_MASK)
static inline int
enc_to_index(rb_encoding *enc)
{
return enc ? ENC_TO_ENCINDEX(enc) : 0;
}
static inline int
str_enc_get_index(VALUE str)
{
int i = ENCODING_GET_INLINED(str);
if (i == ENCODING_INLINE_MAX) {
VALUE iv = rb_ivar_get(str, rb_id_encoding());
i = NUM2INT(iv);
}
return i;
}
#endif
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */