diff options
-rw-r--r-- | embed.fnc | 3 | ||||
-rw-r--r-- | proto.h | 7 | ||||
-rw-r--r-- | regcomp.c | 22 |
3 files changed, 17 insertions, 15 deletions
@@ -1805,7 +1805,8 @@ Es |void |scan_commit |NN const struct RExC_state_t *pRExC_state \ |int is_inf Esn |void |cl_anything |NN struct regnode_charclass_class *cl EsRn |int |cl_is_anything |NN const struct regnode_charclass_class *cl -Esn |void |cl_init |NN struct regnode_charclass_class *cl +Esn |void |cl_init |NN const struct RExC_state_t *pRExC_state \ + |NN struct regnode_charclass_class *cl Esn |void |cl_and |NN struct regnode_charclass_class *cl \ |NN const struct regnode_charclass_class *and_with Esn |void |cl_or |NN struct regnode_charclass_class *cl \ @@ -5993,10 +5993,11 @@ STATIC void S_cl_anything(struct regnode_charclass_class *cl) #define PERL_ARGS_ASSERT_CL_ANYTHING \ assert(cl) -STATIC void S_cl_init(struct regnode_charclass_class *cl) - __attribute__nonnull__(1); +STATIC void S_cl_init(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) + __attribute__nonnull__(1) + __attribute__nonnull__(2); #define PERL_ARGS_ASSERT_CL_INIT \ - assert(cl) + assert(pRExC_state); assert(cl) STATIC int S_cl_is_anything(const struct regnode_charclass_class *cl) __attribute__warn_unused_result__ @@ -754,7 +754,7 @@ S_cl_is_anything(const struct regnode_charclass_class *cl) /* Can match anything (initialization) */ STATIC void -S_cl_init(struct regnode_charclass_class *cl) +S_cl_init(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) { PERL_ARGS_ASSERT_CL_INIT; @@ -2754,7 +2754,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, if (flags & SCF_DO_SUBSTR) SCAN_COMMIT(pRExC_state, data, minlenp); /* Cannot merge strings after this. */ if (flags & SCF_DO_STCLASS) - cl_init_zero(&accum); + cl_init_zero(pRExC_state, &accum); while (OP(scan) == code) { I32 deltanext, minnext, f = 0, fake; @@ -2775,7 +2775,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, if (code != BRANCH) scan = NEXTOPER(scan); if (flags & SCF_DO_STCLASS) { - cl_init(&this_class); + cl_init(pRExC_state, &this_class); data_fake.start_class = &this_class; f = SCF_DO_STCLASS_AND; } @@ -3360,7 +3360,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, data->flags |= SF_IS_INF; } if (flags & SCF_DO_STCLASS) { - cl_init(&this_class); + cl_init(pRExC_state, &this_class); oclass = data->start_class; data->start_class = &this_class; f |= SCF_DO_STCLASS_AND; @@ -3969,7 +3969,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, data_fake.pos_delta = delta; if ( flags & SCF_DO_STCLASS && !scan->flags && OP(scan) == IFMATCH ) { /* Lookahead */ - cl_init(&intrnl); + cl_init(pRExC_state, &intrnl); data_fake.start_class = &intrnl; f |= SCF_DO_STCLASS_AND; } @@ -4003,7 +4003,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, * *** HACK *** for now just treat as "no information". * See [perl #56690]. */ - cl_init(data->start_class); + cl_init(pRExC_state, data->start_class); } else { /* AND before and after: combine and continue */ const int was = (data->start_class->flags & ANYOF_EOS); @@ -4054,7 +4054,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, data_fake.flags |= SF_IS_INF; if ( flags & SCF_DO_STCLASS && !scan->flags && OP(scan) == IFMATCH ) { /* Lookahead */ - cl_init(&intrnl); + cl_init(pRExC_state, &intrnl); data_fake.start_class = &intrnl; f |= SCF_DO_STCLASS_AND; } @@ -4187,7 +4187,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, if (flags & SCF_DO_SUBSTR) /* XXXX Add !SUSPEND? */ SCAN_COMMIT(pRExC_state, data,minlenp); /* Cannot merge strings after this. */ if (flags & SCF_DO_STCLASS) - cl_init_zero(&accum); + cl_init_zero(pRExC_state, &accum); if (!trie->jump) { min1= trie->minlen; @@ -4210,7 +4210,7 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, data_fake.last_closep = &fake; data_fake.pos_delta = delta; if (flags & SCF_DO_STCLASS) { - cl_init(&this_class); + cl_init(pRExC_state, &this_class); data_fake.start_class = &this_class; f = SCF_DO_STCLASS_AND; } @@ -4968,7 +4968,7 @@ reStudy: data.longest = &(data.longest_fixed); first = scan; if (!ri->regstclass) { - cl_init(&ch_class); + cl_init(pRExC_state, &ch_class); data.start_class = &ch_class; stclass_flag = SCF_DO_STCLASS_AND; } else /* XXXX Check for BOUND? */ @@ -5151,7 +5151,7 @@ reStudy: DEBUG_PARSE_r(PerlIO_printf(Perl_debug_log, "\nMulti Top Level\n")); scan = ri->program + 1; - cl_init(&ch_class); + cl_init(pRExC_state, &ch_class); data.start_class = &ch_class; data.last_closep = &last_close; |