develooper Front page | perl.perl5.changes | Postings from March 2018

[perl.git] branch blead updated. v5.27.9-123-g32ce30d709

From:
Tony Cook
Date:
March 7, 2018 04:58
Subject:
[perl.git] branch blead updated. v5.27.9-123-g32ce30d709
Message ID:
E1etR9O-0002nj-SM@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/32ce30d709666239149a4f04ddcfbdec00005288?hp=814eedc877a5aa1dbba0047735733e9491aa94a4>

- Log -----------------------------------------------------------------
commit 32ce30d709666239149a4f04ddcfbdec00005288
Author: Tony Cook <tony@develop-help.com>
Date:   Tue Feb 20 16:18:05 2018 +1100

    (perl #132870) workaround VC2017 compiler bug
    
    For non-debug builds MSVC could read small integers like 1 as -255.
    
    It's possible it was confused by the AIX compiler bug workaround.
    
    This change needs no further tests, the integer.t fails without
    this workaround.

-----------------------------------------------------------------------

Summary of changes:
 dist/Storable/Storable.xs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index df0c433b0e..45af7be210 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -6106,14 +6106,20 @@ static SV *retrieve_byte(pTHX_ stcxt_t *cxt, const char *cname)
     SV *sv;
     HV *stash;
     int siv;
+#ifndef _MSC_VER
     signed char tmp;	/* Workaround for AIX cc bug --H.Merijn Brand */
+#endif
 
     TRACEME(("retrieve_byte (#%d)", (int)cxt->tagnum));
 
     GETMARK(siv);
     TRACEME(("small integer read as %d", (unsigned char) siv));
+#ifdef _MSC_VER
+    sv = newSViv(siv - 128);
+#else
     tmp = (unsigned char) siv - 128;
     sv = newSViv(tmp);
+#endif
     stash = cname ? gv_stashpv(cname, GV_ADD) : 0;
     SEEN_NN(sv, stash, 0);	/* Associate this new scalar with tag "tagnum" */
 

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About