[libmath-prime-util-perl] 142/181: When doing XS bigint downgrade on old Perl, set the string

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:51:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.36
in repository libmath-prime-util-perl.

commit 91a51f76f48907edfa0b9052b86d2d2e3054f53a
Author: Dana Jacobsen <dana at acm.org>
Date:   Wed Jan 8 19:19:42 2014 -0800

    When doing XS bigint downgrade on old Perl, set the string
---
 XS.xs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/XS.xs b/XS.xs
index 82d9b35..598d390 100644
--- a/XS.xs
+++ b/XS.xs
@@ -852,7 +852,11 @@ _validate_num(SV* svn, ...)
     if (_validate_int(aTHX_ svn, 0)) {
       if (SvROK(svn)) {  /* Convert small Math::BigInt object into scalar */
         UV n = my_svuv(svn);
+#if PERL_REVISION <= 5 && PERL_VERSION < 8 && BITS_PER_WORD == 64
+        sv_setpviv(svn, n);
+#else
         sv_setuv(svn, n);
+#endif
       }
       if (items > 1 && ((sv1 = ST(1)), SvOK(sv1))) {
         UV n = my_svuv(svn);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git



More information about the Pkg-perl-cvs-commits mailing list