This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Save an upgrade each by first setting the NV on PL_sv_yes and PL_sv_no
authorNicholas Clark <nick@ccl4.org>
Mon, 7 Jan 2008 17:27:51 +0000 (17:27 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 7 Jan 2008 17:27:51 +0000 (17:27 +0000)
at interpreter construction time.

p4raw-id: //depot/perl@32893

perl.c

diff --git a/perl.c b/perl.c
index abebfa6..c7e9a90 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -301,14 +301,14 @@ perl_construct(pTHXx)
     sv_setpv(&PL_sv_no,PL_No);
     /* value lookup in void context - happens to have the side effect
        of caching the numeric forms.  */
-    SvIV(&PL_sv_no);
     SvNV(&PL_sv_no);
+    SvIV(&PL_sv_no);
     SvREADONLY_on(&PL_sv_no);
     SvREFCNT(&PL_sv_no) = (~(U32)0)/2;
 
     sv_setpv(&PL_sv_yes,PL_Yes);
-    SvIV(&PL_sv_yes);
     SvNV(&PL_sv_yes);
+    SvIV(&PL_sv_yes);
     SvREADONLY_on(&PL_sv_yes);
     SvREFCNT(&PL_sv_yes) = (~(U32)0)/2;