From: Nicholas Clark Date: Sat, 9 Dec 2006 21:17:37 +0000 (+0000) Subject: Exterminate! 2 pieces of superfluous code related to UV setting. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=052d0a1435e1caea295a2e88fc678a10a6dce19f;p=p5sagit%2Fp5-mst-13.2.git Exterminate! 2 pieces of superfluous code related to UV setting. p4raw-id: //depot/perl@29493 --- diff --git a/sv.c b/sv.c index 2665b77..e4deb9d 100644 --- a/sv.c +++ b/sv.c @@ -1558,8 +1558,6 @@ Like C, but also handles 'set' magic. void Perl_sv_setuv_mg(pTHX_ register SV *sv, UV u) { - sv_setiv(sv, 0); - SvIsUV_on(sv); sv_setuv(sv,u); SvSETMAGIC(sv); } @@ -2746,7 +2744,6 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags) if (SvIOK(sv) || ((SvIOKp(sv) && !SvNOKp(sv)))) { /* I'm assuming that if both IV and NV are equally valid then converting the IV is going to be more efficient */ - const U32 isIOK = SvIOK(sv); const U32 isUIOK = SvIsUV(sv); char buf[TYPE_CHARS(UV)]; char *ebuf, *ptr; @@ -2760,12 +2757,6 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags) SvCUR_set(sv, ebuf - ptr); s = SvEND(sv); *s = '\0'; - if (isIOK) - SvIOK_on(sv); - else - SvIOKp_on(sv); - if (isUIOK) - SvIsUV_on(sv); } else if (SvNOKp(sv)) { const int olderrno = errno;