Skip to content

Commit

Permalink
regcomp.c: Use pre-existing macro
Browse files Browse the repository at this point in the history
This macro expands to the code it replaces.  This will make a future
commit easier.
  • Loading branch information
khwilliamson committed Oct 11, 2018
1 parent 3e299a8 commit f568f14
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions regcomp.c
Expand Up @@ -11048,9 +11048,9 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
ARG(ret) = add_data( pRExC_state, ARG(ret) = add_data( pRExC_state,
STR_WITH_LEN("S")); STR_WITH_LEN("S"));
RExC_rxi->data->data[ARG(ret)]=(void*)sv; RExC_rxi->data->data[ARG(ret)]=(void*)sv;
ret->flags = 1; FLAGS(ret) = 1;
} else { } else {
ret->flags = 0; FLAGS(ret) = 0;
} }
if ( internal_argval != -1 ) if ( internal_argval != -1 )
ARG2L_SET(ret, internal_argval); ARG2L_SET(ret, internal_argval);
Expand Down Expand Up @@ -11407,7 +11407,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
RExC_flags & RXf_PMf_COMPILETIME RExC_flags & RXf_PMf_COMPILETIME
); );
if (!SIZE_ONLY) { if (!SIZE_ONLY) {
ret->flags = 2; FLAGS(ret) = 2;
} }
REGTAIL(pRExC_state, ret, eval); REGTAIL(pRExC_state, ret, eval);
/* deal with the length of this later - MJD */ /* deal with the length of this later - MJD */
Expand Down Expand Up @@ -11459,7 +11459,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)


ret = reg_node(pRExC_state, LOGICAL); ret = reg_node(pRExC_state, LOGICAL);
if (!SIZE_ONLY) if (!SIZE_ONLY)
ret->flags = 1; FLAGS(ret) = 1;


tail = reg(pRExC_state, 1, &flag, depth+1); tail = reg(pRExC_state, 1, &flag, depth+1);
RETURN_FAIL_ON_RESTART(flag,flagp); RETURN_FAIL_ON_RESTART(flag,flagp);
Expand Down Expand Up @@ -11879,7 +11879,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
reginsert(pRExC_state, node,ret, depth+1); reginsert(pRExC_state, node,ret, depth+1);
Set_Node_Cur_Length(ret, parse_start); Set_Node_Cur_Length(ret, parse_start);
Set_Node_Offset(ret, parse_start + 1); Set_Node_Offset(ret, parse_start + 1);
ret->flags = flag; FLAGS(ret) = flag;
REGTAIL_STUDY(pRExC_state, ret, reg_node(pRExC_state, TAIL)); REGTAIL_STUDY(pRExC_state, ret, reg_node(pRExC_state, TAIL));
} }
} }
Expand Down Expand Up @@ -12123,7 +12123,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
else { else {
regnode * const w = reg_node(pRExC_state, WHILEM); regnode * const w = reg_node(pRExC_state, WHILEM);


w->flags = 0; FLAGS(w) = 0;
REGTAIL(pRExC_state, ret, w); REGTAIL(pRExC_state, ret, w);
if (!SIZE_ONLY && RExC_extralen) { if (!SIZE_ONLY && RExC_extralen) {
reginsert(pRExC_state, LONGJMP,ret, depth+1); reginsert(pRExC_state, LONGJMP,ret, depth+1);
Expand All @@ -12143,7 +12143,7 @@ S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
RExC_whilem_seen++, RExC_extralen += 3; RExC_whilem_seen++, RExC_extralen += 3;
MARK_NAUGHTY_EXP(1, 4); /* compound interest */ MARK_NAUGHTY_EXP(1, 4); /* compound interest */
} }
ret->flags = 0; FLAGS(ret) = 0;


if (min > 0) if (min > 0)
*flagp = WORST; *flagp = WORST;
Expand Down Expand Up @@ -13042,7 +13042,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
* /\A/ from /^/ in split. We check ret because first pass we * /\A/ from /^/ in split. We check ret because first pass we
* have no regop struct to set the flags on. */ * have no regop struct to set the flags on. */
if (PASS2) if (PASS2)
ret->flags = 1; FLAGS(ret) = 1;
*flagp |= SIMPLE; *flagp |= SIMPLE;
goto finish_meta_pat; goto finish_meta_pat;
case 'G': case 'G':
Expand Down Expand Up @@ -19331,7 +19331,7 @@ S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *operand, U32 depth)
} }
#endif #endif
src = NEXTOPER(place); src = NEXTOPER(place);
place->flags = 0; FLAGS(place) = 0;
FILL_NODE(place, op); FILL_NODE(place, op);
Zero(src, offset, regnode); Zero(src, offset, regnode);
} }
Expand Down

0 comments on commit f568f14

Please sign in to comment.