From 3cdec1b765e713de3b6dfc18b22649729108818f Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 11 Aug 2017 13:45:48 +0900 Subject: [PATCH] disable OP_CCLASS_NODE --- src/regcomp.c | 4 ++++ src/regexec.c | 2 ++ src/regint.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/regcomp.c b/src/regcomp.c index 4b4f556..f348f15 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -6652,7 +6652,9 @@ OnigOpInfoType OnigOpInfo[] = { { OP_CCLASS_NOT, "cclass-not", ARG_SPECIAL }, { OP_CCLASS_MB_NOT, "cclass-mb-not", ARG_SPECIAL }, { OP_CCLASS_MIX_NOT, "cclass-mix-not", ARG_SPECIAL }, +#ifdef USE_OP_CCLASS_NODE { OP_CCLASS_NODE, "cclass-node", ARG_SPECIAL }, +#endif { OP_ANYCHAR, "anychar", ARG_NON }, { OP_ANYCHAR_ML, "anychar-ml", ARG_NON }, { OP_ANYCHAR_STAR, "anychar*", ARG_NON }, @@ -6925,6 +6927,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, UChar* start, fprintf(f, ":%d:%d:%d", n, (int )code, len); break; +#ifdef USE_OP_CCLASS_NODE case OP_CCLASS_NODE: { CClassNode *cc; @@ -6934,6 +6937,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, UChar* start, fprintf(f, ":%p:%d", cc, n); } break; +#endif case OP_BACKREF_N_IC: mem = *((MemNumType* )bp); diff --git a/src/regexec.c b/src/regexec.c index e7dfb96..eaa56fa 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -2002,6 +2002,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, MOP_OUT; break; +#ifdef USE_OP_CCLASS_NODE case OP_CCLASS_NODE: MOP_IN(OP_CCLASS_NODE); { OnigCodePoint code; @@ -2020,6 +2021,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, } MOP_OUT; break; +#endif case OP_ANYCHAR: MOP_IN(OP_ANYCHAR); DATA_ENSURE(1); diff --git a/src/regint.h b/src/regint.h index 0be0ac0..beadfa3 100644 --- a/src/regint.h +++ b/src/regint.h @@ -479,7 +479,9 @@ enum OpCode { OP_CCLASS_NOT, OP_CCLASS_MB_NOT, OP_CCLASS_MIX_NOT, +#ifdef USE_OP_CCLASS_NODE OP_CCLASS_NODE, /* pointer to CClassNode node */ +#endif OP_ANYCHAR, /* "." */ OP_ANYCHAR_ML, /* "." multi-line */ -- 2.40.0