diff options
| author | Mitchell Blank Jr <[email protected]> | 2012-05-19 23:28:40 -0700 |
|---|---|---|
| committer | Mitchell Blank Jr <[email protected]> | 2012-05-19 23:28:40 -0700 |
| commit | e3abf333847f3fd21a5bd62cd52efdf80cc6aa15 (patch) | |
| tree | be14c3dc42dd4e0cb034176cad501a0a52c48a9a /src/regcomp.c | |
| parent | 365cc40ac5cef4b9ad661e133d5ca8526b65f415 (diff) | |
| download | mruby-e3abf333847f3fd21a5bd62cd52efdf80cc6aa15.tar.gz mruby-e3abf333847f3fd21a5bd62cd52efdf80cc6aa15.zip | |
C++ compilability: "not" is a C++ keyword, avoid it
see http://en.cppreference.com/w/cpp/language/operator_alternative
Diffstat (limited to 'src/regcomp.c')
| -rw-r--r-- | src/regcomp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/regcomp.c b/src/regcomp.c index 816e219c7..bb45b3db4 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -1640,8 +1640,8 @@ compile_tree(Node* node, regex_t* reg) switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) op = OP_NOT_WORD; - else op = OP_WORD; + if (NCTYPE(node)->is_not != 0) op = OP_NOT_WORD; + else op = OP_WORD; break; default: return ONIGERR_TYPE_BUG; @@ -2440,8 +2440,8 @@ is_not_included(Node* x, Node* y, regex_t* reg) { switch (ytype) { case NT_CTYPE: - if (NCTYPE(y)->ctype == NCTYPE(x)->ctype && - NCTYPE(y)->not != NCTYPE(x)->not) + if (NCTYPE(y)->ctype == NCTYPE(x)->ctype && + NCTYPE(y)->is_not != NCTYPE(x)->is_not) return 1; else return 0; @@ -2473,7 +2473,7 @@ is_not_included(Node* x, Node* y, regex_t* reg) case NT_CTYPE: switch (NCTYPE(y)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(y)->not == 0) { + if (NCTYPE(y)->is_not == 0) { if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) { for (i = 0; i < SINGLE_BYTE_SIZE; i++) { if (BITSET_AT(xc->bs, i)) { @@ -2550,9 +2550,9 @@ is_not_included(Node* x, Node* y, regex_t* reg) switch (NCTYPE(y)->ctype) { case ONIGENC_CTYPE_WORD: if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) - return NCTYPE(y)->not; + return NCTYPE(y)->is_not; else - return !(NCTYPE(y)->not); + return !(NCTYPE(y)->is_not); break; default: break; @@ -4668,7 +4668,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) { + if (NCTYPE(node)->is_not != 0) { for (i = 0; i < SINGLE_BYTE_SIZE; i++) { if (! ONIGENC_IS_CODE_WORD(env->enc, i)) { add_char_opt_map_info(&opt->map, (UChar )i, env->enc); @@ -6170,7 +6170,7 @@ print_indent_tree(FILE* f, Node* node, int indent) fprintf(f, "<ctype:%x> ", (int )node); switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) + if (NCTYPE(node)->is_not != 0) fputs("not word", f); else fputs("word", f); |
