Looks like I didn't actually test the COW conditional code in
Nicholas Clark [Sun, 12 Nov 2006 18:16:52 +0000 (18:16 +0000)]
change 27533. Perl now compiles, but
ext/Compress/Raw/Zlib/t/07bufsize.t fails.

p4raw-id: //depot/perl@29247

pp_ctl.c
regexec.c

index 6bc8e78..5cbf0a8 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -295,7 +295,7 @@ PP(pp_substcont)
            SvUPGRADE(sv, SVt_PVMG);
        if (!(mg = mg_find(sv, PERL_MAGIC_regex_global))) {
 #ifdef PERL_OLD_COPY_ON_WRITE
-           if (SvIsCOW(lsv))
+           if (SvIsCOW(sv))
                sv_force_normal_flags(sv, 0);
 #endif
            mg = sv_magicext(sv, NULL, PERL_MAGIC_regex_global, &PL_vtbl_mglob,
index 6643cdf..8274b80 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2119,8 +2119,8 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos)
                  && (mg = mg_find(reginfo->sv, PERL_MAGIC_regex_global)))) {
                /* prepare for quick setting of pos */
 #ifdef PERL_OLD_COPY_ON_WRITE
-               if (SvIsCOW(sv))
-                   sv_force_normal_flags(sv, 0);
+               if (SvIsCOW(reginfo->sv))
+                   sv_force_normal_flags(reginfo->sv, 0);
 #endif
                mg = sv_magicext(reginfo->sv, NULL, PERL_MAGIC_regex_global,
                                 &PL_vtbl_mglob, NULL, 0);