#ifdef USE_ITHREADS
if(PL_regex_pad) { /* We could be in destruction */
ReREFCNT_dec(PM_GETRE(cPMOPo));
- av_push((AV*) PL_regex_pad[0],(SV*) PL_regex_pad[(cPMOPo)->op_pmoffset]);
+ av_push((AV*) PL_regex_pad[0],
+ (SV*) SvREFCNT_inc_simple_NN(PL_regex_pad[(cPMOPo)->op_pmoffset]));
SvREADONLY_off(PL_regex_pad[(cPMOPo)->op_pmoffset]);
SvREPADTMP_on(PL_regex_pad[(cPMOPo)->op_pmoffset]);
PM_SETRE_OFFSET(cPMOPo, (cPMOPo)->op_pmoffset);
sv_setiv(repointer,0);
} else {
SV * const repointer = newSViv(0);
- av_push(PL_regex_padav, SvREFCNT_inc_simple_NN(repointer));
+ av_push(PL_regex_padav, repointer);
pmop->op_pmoffset = av_len(PL_regex_padav);
PL_regex_pad = AvARRAY(PL_regex_padav);
}
/* so we know which PL_regex_padav element is PL_reg_curpm
when clearing up in perl_destruct() */
SvFLAGS(repointer) |= SVf_BREAK;
- av_push(PL_regex_padav,repointer);
+ av_push(PL_regex_padav,SvREFCNT_inc_simple_NN(repointer));
PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav);
PL_regex_pad = AvARRAY(PL_regex_padav);
}
SV * const sv =
SvREPADTMP(regex)
? sv_dup_inc((SV*) regex, param)
- : SvREFCNT_inc(
- newSViv(PTR2IV(sv_dup_inc(INT2PTR(SV *, SvIVX(regex)), param))))
+ : newSViv(PTR2IV(sv_dup_inc(INT2PTR(SV *, SvIVX(regex)), param)))
;
if (SvFLAGS(regex) & SVf_BREAK)
SvFLAGS(sv) |= SVf_BREAK; /* unrefcnted PL_curpm */