From b5b886f0f113b982e26459e81d1c45c4dfdd765f Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 19 Feb 2006 12:14:15 +0000 Subject: [PATCH] SvROK(sv) will never be true when SvIOKp() or SvNOKp() is true, so the code inside the if() test in sv_2pv_flags is dead and can be removed. p4raw-id: //depot/perl@27227 --- sv.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sv.c b/sv.c index 4a91dd6..bbdeb99 100644 --- 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 -- 2.7.4