From: Nicholas Clark Date: Mon, 7 Jan 2008 21:17:10 +0000 (+0000) Subject: Clarify the use of SVf_BREAK on PL_reg_curpm. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=36c662f48c9a23ec4251c3cf747c3f42c63a6fd9;p=p5sagit%2Fp5-mst-13.2.git Clarify the use of SVf_BREAK on PL_reg_curpm. p4raw-id: //depot/perl@32895 --- diff --git a/regexec.c b/regexec.c index 0f1c9e1..26c7a1a 100644 --- a/regexec.c +++ b/regexec.c @@ -2256,7 +2256,8 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) #ifdef USE_ITHREADS { SV* const repointer = newSViv(0); - /* so we know which PL_regex_padav element is PL_reg_curpm */ + /* 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); PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav); diff --git a/sv.h b/sv.h index ed25383..c80c2aa 100644 --- a/sv.h +++ b/sv.h @@ -339,7 +339,9 @@ perform the upgrade if necessary. See C. means that a hv_aux struct is present after the main array */ #define SVf_BREAK 0x04000000 /* refcnt is artificially low - used by - SV's in final arena cleanup */ + SVs in final arena cleanup. + Set in S_regtry on PL_reg_curpm, so that + perl_destruct will skip it. */ #define SVf_READONLY 0x08000000 /* may not be modified */