diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/encoding.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 5ea2cda116..ceedf0db65 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -232,7 +232,12 @@ int rb_enc_code_to_mbclen(int code, rb_encoding *enc); #define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c)) #define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c)) -#define rb_enc_asciicompat(enc) (rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc)) +static inline int +rb_enc_asciicompat_inline(rb_encoding *enc) +{ + return rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc); +} +#define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc) int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc); int rb_enc_toupper(int c, rb_encoding *enc); |