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

mercurial at gmplib.org mercurial at gmplib.org
Tue Oct 13 20:39:34 UTC 2015


details:   /var/hg/gmp/rev/4fca7a1583c1
changeset: 16856:4fca7a1583c1
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Oct 13 22:39:14 2015 +0200
description:
mp?/clears.c, mp?/inits.c: Support empty list

details:   /var/hg/gmp/rev/015468f454c8
changeset: 16857:015468f454c8
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Oct 13 22:39:19 2015 +0200
description:
ChangeLog

diffstat:

 ChangeLog    |  5 +++++
 mpf/clears.c |  3 +--
 mpf/inits.c  |  3 +--
 mpq/clears.c |  3 +--
 mpq/inits.c  |  3 +--
 mpz/clears.c |  3 +--
 mpz/inits.c  |  3 +--
 7 files changed, 11 insertions(+), 12 deletions(-)

diffs (118 lines):

diff -r c07dcef24819 -r 015468f454c8 ChangeLog
--- a/ChangeLog	Tue Oct 13 21:56:13 2015 +0200
+++ b/ChangeLog	Tue Oct 13 22:39:19 2015 +0200
@@ -1,3 +1,8 @@
+2015-10-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: Keep on supporting empty list.
+
 2015-10-13  Marc Glisse  <marc.glisse at inria.fr>
 
 	* gmpxx.h (__GMPP_DEFINE_BINARY_TYPE_FUNCTION): Allow mixed operations.
diff -r c07dcef24819 -r 015468f454c8 mpf/clears.c
--- a/mpf/clears.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpf/clears.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,12 +39,11 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       __GMP_FREE_FUNC_LIMBS (PTR(x), PREC(x) + 1);
       x = va_arg (ap, mpf_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }
diff -r c07dcef24819 -r 015468f454c8 mpf/inits.c
--- a/mpf/inits.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpf/inits.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,12 +39,11 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       mpf_init (x);
       x = va_arg (ap, mpf_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }
diff -r c07dcef24819 -r 015468f454c8 mpq/clears.c
--- a/mpq/clears.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpq/clears.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,13 +39,12 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       __GMP_FREE_FUNC_LIMBS (PTR(NUM(x)), ALLOC(NUM(x)));
       __GMP_FREE_FUNC_LIMBS (PTR(DEN(x)), ALLOC(DEN(x)));
       x = va_arg (ap, mpq_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }
diff -r c07dcef24819 -r 015468f454c8 mpq/inits.c
--- a/mpq/inits.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpq/inits.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,12 +39,11 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       mpq_init (x);
       x = va_arg (ap, mpq_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }
diff -r c07dcef24819 -r 015468f454c8 mpz/clears.c
--- a/mpz/clears.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpz/clears.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,12 +39,11 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       __GMP_FREE_FUNC_LIMBS (PTR (x), ALLOC(x));
       x = va_arg (ap, mpz_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }
diff -r c07dcef24819 -r 015468f454c8 mpz/inits.c
--- a/mpz/inits.c	Tue Oct 13 21:56:13 2015 +0200
+++ b/mpz/inits.c	Tue Oct 13 22:39:19 2015 +0200
@@ -39,7 +39,7 @@
 
   va_start (ap, x);
 
-  do
+  while (x != NULL)
     {
       ALLOC (x) = 1;
       PTR (x) = __GMP_ALLOCATE_FUNC_LIMBS (1);
@@ -52,7 +52,6 @@
 
       x = va_arg (ap, mpz_ptr);
     }
-  while (x != NULL);
 
   va_end (ap);
 }


More information about the gmp-commit mailing list