SvROK(sv) will never be true when SvIOKp() or SvNOKp() is true, so the
Nicholas Clark [Sun, 19 Feb 2006 12:14:15 +0000 (12:14 +0000)]
code inside the if() test in sv_2pv_flags is dead and can be removed.

p4raw-id: //depot/perl@27227

sv.c

diff --git a/sv.c b/sv.c
index 4a91dd6..bbdeb99 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2601,16 +2601,8 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
                Gconvert(SvNVX(sv), NV_DIG, 0, tbuf);
                len = strlen(tbuf);
            }
-           if (SvROK(sv)) {    /* XXX Skip this when sv_pvn_force calls */
-               /* Sneaky stuff here */
-               SV * const tsv = newSVpvn(tbuf, len);
-
-               sv_2mortal(tsv);
-               if (lp)
-                   *lp = SvCUR(tsv);
-               return SvPVX(tsv);
-           }
-           else {
+           assert(!SvROK(sv));
+           {
                dVAR;
 
 #ifdef FIXNEGATIVEZERO