diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-22 22:58:58 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-23 10:19:36 -0800 |
commit | 654c723fd377eb0d22b2bff31f08cbc7db15dcaa (patch) | |
tree | fbfebb47aea1d3cc8cc55fbbea79793852371d2c /sv.c | |
parent | 18984c14b373cb9ef631091f5c5e151e9b0971f0 (diff) | |
download | perl-654c723fd377eb0d22b2bff31f08cbc7db15dcaa.tar.gz |
sv.c:sv_utf8_encode: simplify code
sv_force_normal already croaks for read-only variables
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -3521,11 +3521,8 @@ Perl_sv_utf8_encode(pTHX_ register SV *const sv) { PERL_ARGS_ASSERT_SV_UTF8_ENCODE; - if (SvIsCOW(sv)) { - sv_force_normal_flags(sv, 0); - } if (SvREADONLY(sv)) { - Perl_croak_no_modify(aTHX); + sv_force_normal_flags(sv, 0); } (void) sv_utf8_upgrade(sv); SvUTF8_off(sv); |