diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2008-03-04 08:54:29 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-03-10 11:07:11 +0000 |
commit | 3788ef8ffa548a64c7425dab843bc6e906dec25c (patch) | |
tree | 27afadca4fd53b59c67971b89905f6830345539e /doop.c | |
parent | 8ed0547917b5366519f80a9298ced6aebb27aeef (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |