From: Nicholas Clark Date: Sun, 19 Feb 2006 12:14:15 +0000 (+0000) Subject: SvROK(sv) will never be true when SvIOKp() or SvNOKp() is true, so the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5b886f0f113b982e26459e81d1c45c4dfdd765f;p=p5sagit%2Fp5-mst-13.2.git 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 --- 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