diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-27 23:59:19 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-07-27 23:59:19 -0700 |
commit | deaf58b8802900d0a53e4faca7896971ce9a9dad (patch) | |
tree | e4505afb2a7c65b5528eafb524ff5fdc6c449f2f /doop.c | |
parent | 1ec4f607b95237e7d3022e1f5df41f1167be4523 (diff) | |
download | perl-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |