This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
3 instances of SvIsUV_on(sv); can be replaced with one.
authorNicholas Clark <nick@ccl4.org>
Wed, 7 Dec 2005 08:30:26 +0000 (08:30 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 7 Dec 2005 08:30:26 +0000 (08:30 +0000)
p4raw-id: //depot/perl@26289

sv.c

diff --git a/sv.c b/sv.c
index 6f2b847..f9d10fc 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1801,19 +1801,17 @@ S_sv_2iuv_common(pTHX_ SV *sv) {
                     SvIsUV_on(sv);
                     /* Integer is inaccurate. NOK, IOKp, is UV */
                     SvUV_set(sv, UV_MAX);
                     SvIsUV_on(sv);
                     /* Integer is inaccurate. NOK, IOKp, is UV */
                     SvUV_set(sv, UV_MAX);
-                    SvIsUV_on(sv);
                 } else {
                     SvUV_set(sv, U_V(SvNVX(sv)));
                     /* 0xFFFFFFFFFFFFFFFF not an issue in here, NVs
                        NV preservse UV so can do correct comparison.  */
                     if ((NV)(SvUVX(sv)) == SvNVX(sv)) {
                         SvIOK_on(sv);
                 } else {
                     SvUV_set(sv, U_V(SvNVX(sv)));
                     /* 0xFFFFFFFFFFFFFFFF not an issue in here, NVs
                        NV preservse UV so can do correct comparison.  */
                     if ((NV)(SvUVX(sv)) == SvNVX(sv)) {
                         SvIOK_on(sv);
-                        SvIsUV_on(sv);
                     } else {
                         /* Integer is imprecise. NOK, IOKp, is UV */
                     } else {
                         /* Integer is imprecise. NOK, IOKp, is UV */
-                        SvIsUV_on(sv);
                     }
                 }
                     }
                 }
+               SvIsUV_on(sv);
             }
 #else /* NV_PRESERVES_UV */
             if ((numtype & (IS_NUMBER_IN_UV | IS_NUMBER_NOT_INT))
             }
 #else /* NV_PRESERVES_UV */
             if ((numtype & (IS_NUMBER_IN_UV | IS_NUMBER_NOT_INT))