diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-08-10 11:53:20 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-08-11 19:32:31 -0600 |
commit | 70ce1368b07e8958e7d4cb38d714ae744eed1bff (patch) | |
tree | 468c152200077dafb6a0664b28476db147d4d083 /regcomp.c | |
parent | 0ccf8511670a0328f6f0142c36308afb3be61ba2 (diff) | |
download | perl-70ce1368b07e8958e7d4cb38d714ae744eed1bff.tar.gz |
regcomp.c: Use old paradigm in dealing with flags recursively
In a recursive call to reg(), instead of passing our flags pointer, pass
a new one and upon return or in that result with the existing one. I
can see why this should be done, as you don't want to lose what you
already have, as reg() will start by resetting it to 0. I don't know
why one ands it with the known flags, but I'm presuming there is a
reason, and so am copying the paradigm. I searched the commit messages
and didn't find anything. No tests failed, and I didn't figure out a
test that would fail.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -9774,6 +9774,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** node_p, UV *valuep, I SV * substitute_parse = newSVpvn_flags("?:", 2, SVf_UTF8|SVs_TEMP); STRLEN len; char *orig_end = RExC_end; + I32 flags; while (RExC_parse < endbrace) { @@ -9799,7 +9800,8 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** node_p, UV *valuep, I /* The values are Unicode, and therefore not subject to recoding */ RExC_override_recoding = 1; - *node_p = reg(pRExC_state, 1, flagp, depth+1); + *node_p = reg(pRExC_state, 1, &flags, depth+1); + *flagp |= flags&(HASWIDTH|SPSTART|SIMPLE|POSTPONED); RExC_parse = endbrace; RExC_end = orig_end; |