[libmath-prime-util-perl] 68/181: Hacky workaround to for MPU:GMP not understanding leading plusses
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:51:07 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 8c6005404fdff57c2723703392eaa058f473fe0f
Author: Dana Jacobsen <dana at acm.org>
Date: Mon Dec 30 11:44:19 2013 -0800
Hacky workaround to for MPU:GMP not understanding leading plusses
---
lib/Math/Prime/Util/PP.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/Math/Prime/Util/PP.pm b/lib/Math/Prime/Util/PP.pm
index d5383bb..2f4b7c7 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -81,6 +81,7 @@ sub _validate_num {
if $n eq '' || ($n =~ tr/0123456789//c && $n !~ /^\+\d+/);
croak "Parameter '$n' must be >= $min" if defined $min && $n < $min;
croak "Parameter '$n' must be <= $max" if defined $max && $n > $max;
+ substr($_[0],0,1,'') if substr($n,0,1) eq '+';
return 0 unless $n < ~0 || int($n) eq ''.~0;
1;
}
--
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