From: K.Kosako Date: Tue, 19 Feb 2019 07:58:07 +0000 (+0900) Subject: opcode of Operation is needed to free member value X-Git-Tag: v6.9.2_rc1~65^2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=450f2ccfb0b6d85fba51654b47d2934610c8acb3;p=onig opcode of Operation is needed to free member value --- diff --git a/src/regexec.c b/src/regexec.c index 80c98cb..2991036 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -2436,18 +2436,10 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, MatchArg* msa) { -#ifdef ONIG_DEBUG -#if defined(USE_DIRECT_THREADED_CODE) - static Operation FinishCode[] = { {.opcode=OP_FINISH, .opaddr=&&L_FINISH } }; -#else - static Operation FinishCode[] = { {OP_FINISH } }; -#endif -#else #if defined(USE_DIRECT_THREADED_CODE) - static Operation FinishCode[] = { { {.opaddr=&&L_FINISH} } }; + static Operation FinishCode[] = { { .opaddr=&&L_FINISH, .opcode=OP_FINISH } }; #else - static Operation FinishCode[] = { { {OP_FINISH} } }; -#endif + static Operation FinishCode[] = { { OP_FINISH } }; #endif #ifdef USE_GOTO_LABELS_AS_VALUES diff --git a/src/regint.h b/src/regint.h index e25568c..6800e6d 100644 --- a/src/regint.h +++ b/src/regint.h @@ -802,14 +802,10 @@ typedef int ModeType; typedef struct { -#ifdef ONIG_DEBUG - enum OpCode opcode; +#ifdef USE_DIRECT_THREADED_CODE const void* opaddr; #else - union { - enum OpCode opcode; - const void* opaddr; - }; + enum OpCode opcode; #endif union { struct { @@ -914,8 +910,11 @@ typedef struct { MemNumType id; } callout_name; #endif - }; + +#ifdef USE_DIRECT_THREADED_CODE + enum OpCode opcode; +#endif } Operation; typedef struct {