]> granicus.if.org Git - onig/commitdiff
re-define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING()
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 4 Apr 2018 06:27:02 +0000 (15:27 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 4 Apr 2018 06:27:02 +0000 (15:27 +0900)
src/regenc.h

index 3d287860b7716baaac198ac51e858f7579efd027..12d51057b1b6c5c864f79d8fa09b0427cf1f5246 100644 (file)
@@ -256,6 +256,7 @@ extern const unsigned short OnigEncAsciiCtypeTable[];
 #define ONIGENC_IS_UNICODE_ENCODING(enc) \
   ((enc)->is_code_ctype == onigenc_unicode_is_code_ctype)
 
-#define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc)  ((enc)->min_enc_len == 1)
+#define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc)  \
+  (((enc)->flag & ENC_FLAG_ASCII_COMPATIBLE) != 0)
 
 #endif /* REGENC_H */