[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 28 17:56:48 UTC 2015


details:   /var/hg/gmp/rev/da0f9141c69e
changeset: 17009:da0f9141c69e
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 28 18:51:30 2015 +0100
description:
tests/mpz/t-nextprime.c: Explicitly cast to avoid a warning.

details:   /var/hg/gmp/rev/0cfffdc586ae
changeset: 17010:0cfffdc586ae
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 28 18:52:48 2015 +0100
description:
mpq/set_str.c: Use __GMP_FREE_FUNC_TYPE

details:   /var/hg/gmp/rev/af62e8f245fe
changeset: 17011:af62e8f245fe
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 28 18:56:14 2015 +0100
description:
ChangeLog

diffstat:

 ChangeLog               |  12 ++++++++++++
 mpq/set_str.c           |   4 ++--
 tests/mpz/t-nextprime.c |   7 ++++---
 3 files changed, 18 insertions(+), 5 deletions(-)

diffs (73 lines):

diff -r d54d5254777c -r af62e8f245fe ChangeLog
--- a/ChangeLog	Sat Dec 26 22:05:42 2015 +0100
+++ b/ChangeLog	Mon Dec 28 18:56:14 2015 +0100
@@ -1,3 +1,8 @@
+2015-12-28 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpq/set_str.c: Use __GMP_FREE_FUNC_TYPE.
+	* tests/mpz/t-nextprime.c: Speedup using swap, and correct type.
+
 2015-12-26  Torbjörn Granlund  <torbjorng at google.com>
 
 	* tests/misc.c (tests_start): Assert library version.
@@ -13,6 +18,13 @@
 	New function.
 	(__gmpn_cpuvec_init): Handle more BMI2 crippled CPUs.
 
+2015-12-13 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpf/clears.c, mpf/inits.c, mpq/clears.c, mpq/inits.c,
+	* mpz/clears.c, mpz/inits.c: Stop supporting empty list.
+	* tests/arm32call.asm: bx->ret to support thumb-less chips 
+	  (thanks Martin Husemann).
+
 2015-12-13  Torbjörn Granlund  <torbjorng at google.com>
 
 	* config.sub: Fix spelling of kabylake.
diff -r d54d5254777c -r af62e8f245fe mpq/set_str.c
--- a/mpq/set_str.c	Sat Dec 26 22:05:42 2015 +0100
+++ b/mpq/set_str.c	Mon Dec 28 18:56:14 2015 +0100
@@ -1,6 +1,6 @@
 /* mpq_set_str -- string to mpq conversion.
 
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2015 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -60,7 +60,7 @@
   memcpy (num, str, numlen);
   num[numlen] = '\0';
   ret = mpz_set_str (mpq_numref(q), num, base);
-  (*__gmp_free_func) (num, numlen+1);
+  __GMP_FREE_FUNC_TYPE (num, numlen+1, char);
 
   if (ret != 0)
     return ret;
diff -r d54d5254777c -r af62e8f245fe tests/mpz/t-nextprime.c
--- a/tests/mpz/t-nextprime.c	Sat Dec 26 22:05:42 2015 +0100
+++ b/tests/mpz/t-nextprime.c	Mon Dec 28 18:56:14 2015 +0100
@@ -1,6 +1,6 @@
 /* Test mpz_nextprime.
 
-Copyright 2009 Free Software Foundation, Inc.
+Copyright 2009, 2015 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -46,12 +46,13 @@
     {
       mpz_nextprime (y, x);
       mpz_sub (x, y, x);
-      if (diffs != NULL && diffs[i] != mpz_get_ui (x))
+      if (diffs != NULL &&
+	  (! mpz_fits_sshort_p (x) || diffs[i] != (short) mpz_get_ui (x)))
 	{
 	  gmp_printf ("diff list discrepancy\n");
 	  abort ();
 	}
-      mpz_set (x, y);
+      mpz_swap (x, y);
     }
 
   mpz_set_str (y, end, 0);


More information about the gmp-commit mailing list