From deaf58b8802900d0a53e4faca7896971ce9a9dad Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 27 Jul 2012 23:59:19 -0700 Subject: [PATCH] =?utf8?q?doop.c:=20Simplify=20do=5Ftrans=E2=80=99=20un-co?= =?utf8?q?w=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since it calls SvPV_force_nomg a little further on, there is no need for a separate sv_force_normal call to handle COWs. --- doop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doop.c b/doop.c index bfcdef5..9d75b3d 100644 --- a/doop.c +++ b/doop.c @@ -632,9 +632,7 @@ Perl_do_trans(pTHX_ SV *sv) PERL_ARGS_ASSERT_DO_TRANS; if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) { - if (SvIsCOW(sv)) - sv_force_normal_flags(sv, 0); - if (SvREADONLY(sv)) + if (!SvIsCOW(sv)) Perl_croak_no_modify(aTHX); } (void)SvPV_const(sv, len); -- 1.8.3.1