summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-27 23:59:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-27 23:59:19 -0700
commitdeaf58b8802900d0a53e4faca7896971ce9a9dad (patch)
treee4505afb2a7c65b5528eafb524ff5fdc6c449f2f /doop.c
parent1ec4f607b95237e7d3022e1f5df41f1167be4523 (diff)
downloadperl-deaf58b8802900d0a53e4faca7896971ce9a9dad.tar.gz
doop.c: Simplify do_trans’ un-cow logic
Since it calls SvPV_force_nomg a little further on, there is no need for a separate sv_force_normal call to handle COWs.
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index bfcdef577e..9d75b3de79 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);