Remove two pointless uses of sv_2mortal
authorFather Chrysostomos <sprout@cpan.org>
Mon, 6 Jun 2011 03:09:13 +0000 (20:09 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 6 Jun 2011 03:09:13 +0000 (20:09 -0700)
boolSV returns an immortal. When sv_2mortal is called on
an immortal, it simply returns. So eliminate the call.

universal.c

index a8113d0..35d1bcc 100644 (file)
@@ -699,7 +699,6 @@ XS(XS_utf8_decode)
        if (SvIsCOW(sv)) sv_force_normal(sv);
        RETVAL = sv_utf8_decode(sv);
        ST(0) = boolSV(RETVAL);
-       sv_2mortal(ST(0));
     }
     XSRETURN(1);
 }
@@ -733,7 +732,6 @@ XS(XS_utf8_downgrade)
         const bool RETVAL = sv_utf8_downgrade(sv, failok);
 
        ST(0) = boolSV(RETVAL);
-       sv_2mortal(ST(0));
     }
     XSRETURN(1);
 }