Clarify the use of SVf_BREAK on PL_reg_curpm.
Nicholas Clark [Mon, 7 Jan 2008 21:17:10 +0000 (21:17 +0000)]
p4raw-id: //depot/perl@32895

regexec.c
sv.h

index 0f1c9e1..26c7a1a 100644 (file)
--- 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 (file)
--- a/sv.h
+++ b/sv.h
@@ -339,7 +339,9 @@ perform the upgrade if necessary.  See C<svtype>.
                                       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 */