This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
universal.c:XS_utf8_decode: rmv redundant code
authorFather Chrysostomos <sprout@cpan.org>
Mon, 23 Jan 2012 06:56:50 +0000 (22:56 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 23 Jan 2012 18:19:36 +0000 (10:19 -0800)
SvPV_force_nolen already calls sv_force_normal for us.

universal.c

index f6da76d..463651b 100644 (file)
@@ -812,7 +812,6 @@ XS(XS_utf8_decode)
     else {
        SV * const sv = ST(0);
        bool RETVAL;
-       if (SvREADONLY(sv)) sv_force_normal(sv);
        SvPV_force_nolen(sv);
        RETVAL = sv_utf8_decode(sv);
        ST(0) = boolSV(RETVAL);