This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Exterminate! 2 pieces of superfluous code related to UV setting.
authorNicholas Clark <nick@ccl4.org>
Sat, 9 Dec 2006 21:17:37 +0000 (21:17 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 9 Dec 2006 21:17:37 +0000 (21:17 +0000)
p4raw-id: //depot/perl@29493

sv.c

diff --git a/sv.c b/sv.c
index 2665b77..e4deb9d 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1558,8 +1558,6 @@ Like C<sv_setuv>, 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;