From 402415e14e2ae90938c76d122a73bcda899eed40 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Mon, 5 Feb 2018 15:15:56 +0900 Subject: [PATCH] refactoring --- src/regexec.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/regexec.c b/src/regexec.c index 3a1c0bb..2255b6c 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -1471,16 +1471,18 @@ stack_double(int is_alloca, char** arg_alloc_base, stk--;\ STACK_BASE_CHECK(stk, (aname));\ if (stk->type == (til_type)) break;\ - else if (stk->type == STK_MEM_START) {\ - mem_start_stk[stk->id] = stk->u.mem.start;\ - mem_end_stk[stk->id] = stk->u.mem.end;\ - }\ - else if (stk->type == STK_REPEAT_INC) {\ - STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\ - }\ - else if (stk->type == STK_MEM_END) {\ - mem_start_stk[stk->id] = stk->u.mem.start;\ - mem_end_stk[stk->id] = stk->u.mem.end;\ + else if ((stk->type & STK_MASK_POP_HANDLED) != 0) {\ + if (stk->type == STK_MEM_START) {\ + mem_start_stk[stk->id] = stk->u.mem.start;\ + mem_end_stk[stk->id] = stk->u.mem.end;\ + }\ + else if (stk->type == STK_REPEAT_INC) {\ + STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\ + }\ + else if (stk->type == STK_MEM_END) {\ + mem_start_stk[stk->id] = stk->u.mem.start;\ + mem_end_stk[stk->id] = stk->u.mem.end;\ + }\ }\ }\ } while(0) -- 2.40.0