summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2008-03-04 08:54:29 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-03-10 11:07:11 +0000
commit3788ef8ffa548a64c7425dab843bc6e906dec25c (patch)
tree27afadca4fd53b59c67971b89905f6830345539e /doop.c
parent8ed0547917b5366519f80a9298ced6aebb27aeef (diff)
downloadperl-3788ef8ffa548a64c7425dab843bc6e906dec25c.tar.gz
count-only transliteration needlessly makes copy-on-write
From: "Yitzchak Scott-Thoennes" <sthoenna@efn.org> Message-ID: <47935.71.32.86.11.1204678469.squirrel@webmail.efn.org> p4raw-id: //depot/perl@33457
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/doop.c b/doop.c
index 1a5c829a6f..8bd7c0f414 100644
--- a/doop.c
+++ b/doop.c
@@ -633,10 +633,10 @@ Perl_do_trans(pTHX_ SV *sv)
PERL_ARGS_ASSERT_DO_TRANS;
- if (SvREADONLY(sv)) {
+ if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) {
if (SvIsCOW(sv))
sv_force_normal_flags(sv, 0);
- if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
+ if (SvREADONLY(sv))
Perl_croak(aTHX_ PL_no_modify);
}
(void)SvPV_const(sv, len);