From 51a9ea209c379f02dc1ea497fd0d6bbc3b43052e Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 12 Nov 2006 18:16:52 +0000 Subject: [PATCH] Looks like I didn't actually test the COW conditional code in change 27533. Perl now compiles, but ext/Compress/Raw/Zlib/t/07bufsize.t fails. p4raw-id: //depot/perl@29247 --- pp_ctl.c | 2 +- regexec.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 6bc8e78..5cbf0a8 100644 --- 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, diff --git a/regexec.c b/regexec.c index 6643cdf..8274b80 100644 --- 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); -- 1.8.3.1