From 6f8e9c7cbed12edeec3cc51201a503f2c1718b5c Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Thu, 10 Aug 2017 11:12:45 +0900 Subject: [PATCH] rename IS_CODE_SB_WORD() to IS_CODE_WORD_ASCII() --- src/regcomp.c | 4 ++-- src/regint.h | 2 +- src/regparse.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/regcomp.c b/src/regcomp.c index 7c04a4d..5278986 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -2533,7 +2533,7 @@ is_exclusive(Node* x, Node* y, regex_t* reg) if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) { for (i = 0; i < SINGLE_BYTE_SIZE; i++) { if (BITSET_AT(xc->bs, i)) { - if (IS_CODE_SB_WORD(reg->enc, i)) return 0; + if (IS_CODE_WORD_ASCII(reg->enc, i)) return 0; } } return 1; @@ -2543,7 +2543,7 @@ is_exclusive(Node* x, Node* y, regex_t* reg) else { if (IS_NOT_NULL(xc->mbuf)) return 0; for (i = 0; i < SINGLE_BYTE_SIZE; i++) { - if (! IS_CODE_SB_WORD(reg->enc, i)) { + if (! IS_CODE_WORD_ASCII(reg->enc, i)) { if (!IS_NCCLASS_NOT(xc)) { if (BITSET_AT(xc->bs, i)) return 0; diff --git a/src/regint.h b/src/regint.h index 8cd47c4..4df470e 100644 --- a/src/regint.h +++ b/src/regint.h @@ -729,7 +729,7 @@ typedef struct { } OnigMatchArg; -#define IS_CODE_SB_WORD(enc,code) \ +#define IS_CODE_WORD_ASCII(enc,code) \ (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code)) typedef struct OnigEndCallListItem { diff --git a/src/regparse.c b/src/regparse.c index 65d3653..f46652d 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -4521,7 +4521,7 @@ add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env) case ONIGENC_CTYPE_WORD: if (not == 0) { for (c = 0; c < SINGLE_BYTE_SIZE; c++) { - if (IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c); + if (IS_CODE_WORD_ASCII(enc, c)) BITSET_SET_BIT(cc->bs, c); } ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf); } -- 2.50.1