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

mercurial at gmplib.org mercurial at gmplib.org
Sun Jan 19 12:39:30 UTC 2014


details:   /var/hg/gmp/rev/81932d68f10d
changeset: 16222:81932d68f10d
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Jan 19 13:37:38 2014 +0100
description:
Use mpq_t inn favour of MP_RAT.

details:   /var/hg/gmp/rev/cc341d67c5b9
changeset: 16223:cc341d67c5b9
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Jan 19 13:37:53 2014 +0100
description:
Update header.

details:   /var/hg/gmp/rev/8f9c58b1fcf5
changeset: 16224:8f9c58b1fcf5
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Jan 19 13:39:26 2014 +0100
description:
ChangeLog

diffstat:

 ChangeLog          |   2 ++
 mpq/canonicalize.c |   2 +-
 mpq/clear.c        |   4 ++--
 mpq/cmp.c          |   2 +-
 mpq/cmp_ui.c       |   2 +-
 mpq/get_d.c        |   2 +-
 mpq/init.c         |   2 +-
 mpq/set_si.c       |   2 +-
 mpq/set_ui.c       |   2 +-
 mpz/iset_str.c     |  10 ++++------
 10 files changed, 15 insertions(+), 15 deletions(-)

diffs (130 lines):

diff -r 84d5467c199f -r 8f9c58b1fcf5 ChangeLog
--- a/ChangeLog	Sun Jan 19 13:25:03 2014 +0100
+++ b/ChangeLog	Sun Jan 19 13:39:26 2014 +0100
@@ -1,5 +1,7 @@
 2014-01-19  Torbjorn Granlund  <tege at gmplib.org>
 
+	* Use mpq_t in favour of MP_RAT.
+
 	* Get rid of BYTES_PER_MP_LIMB, most files affected.
 
 	* mpz/iset.c: Avoid overflow in allocation computation.
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/canonicalize.c
--- a/mpq/canonicalize.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/canonicalize.c	Sun Jan 19 13:39:26 2014 +0100
@@ -22,7 +22,7 @@
 #include "gmp-impl.h"
 
 void
-mpq_canonicalize (MP_RAT *op)
+mpq_canonicalize (mpq_t op)
 {
   mpz_t gcd;
   TMP_DECL;
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/clear.c
--- a/mpq/clear.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/clear.c	Sun Jan 19 13:39:26 2014 +0100
@@ -1,4 +1,4 @@
-/* mpq_clear -- free the space occupied by a MP_RAT.
+/* mpq_clear -- free the space occupied by a mpq_t.
 
 Copyright 1991, 1994, 1995, 2000, 2001 Free Software Foundation, Inc.
 
@@ -21,7 +21,7 @@
 #include "gmp-impl.h"
 
 void
-mpq_clear (MP_RAT *m)
+mpq_clear (mpq_t m)
 {
   (*__gmp_free_func) (PTR(NUM(m)),
 		    (size_t) ALLOC(NUM(m)) * GMP_LIMB_BYTES);
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/cmp.c
--- a/mpq/cmp.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/cmp.c	Sun Jan 19 13:39:26 2014 +0100
@@ -23,7 +23,7 @@
 #include "longlong.h"
 
 int
-mpq_cmp (const MP_RAT *op1, const MP_RAT *op2)
+mpq_cmp (const mpq_t op1, const mpq_t op2)
 {
   mp_size_t num1_size = SIZ(NUM(op1));
   mp_size_t den1_size = SIZ(DEN(op1));
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/cmp_ui.c
--- a/mpq/cmp_ui.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/cmp_ui.c	Sun Jan 19 13:39:26 2014 +0100
@@ -23,7 +23,7 @@
 #include "gmp-impl.h"
 
 int
-_mpq_cmp_ui (const MP_RAT *op1, unsigned long int num2, unsigned long int den2)
+_mpq_cmp_ui (const mpq_t op1, unsigned long int num2, unsigned long int den2)
 {
   mp_size_t num1_size = SIZ(NUM(op1));
   mp_size_t den1_size = SIZ(DEN(op1));
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/get_d.c
--- a/mpq/get_d.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/get_d.c	Sun Jan 19 13:39:26 2014 +0100
@@ -90,7 +90,7 @@
    like to have helping everywhere that uses a quotient-only division. */
 
 double
-mpq_get_d (const MP_RAT *src)
+mpq_get_d (const mpq_t src)
 {
   double res;
   mp_srcptr np, dp;
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/init.c
--- a/mpq/init.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/init.c	Sun Jan 19 13:39:26 2014 +0100
@@ -21,7 +21,7 @@
 #include "gmp-impl.h"
 
 void
-mpq_init (MP_RAT *x)
+mpq_init (mpq_t x)
 {
   ALLOC(NUM(x)) = 1;
   PTR(NUM(x)) = (mp_ptr) (*__gmp_allocate_func) (GMP_LIMB_BYTES);
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/set_si.c
--- a/mpq/set_si.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/set_si.c	Sun Jan 19 13:39:26 2014 +0100
@@ -22,7 +22,7 @@
 #include "gmp-impl.h"
 
 void
-mpq_set_si (MP_RAT *dest, signed long int num, unsigned long int den)
+mpq_set_si (mpq_t dest, signed long int num, unsigned long int den)
 {
   unsigned long int abs_num;
 
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpq/set_ui.c
--- a/mpq/set_ui.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpq/set_ui.c	Sun Jan 19 13:39:26 2014 +0100
@@ -22,7 +22,7 @@
 #include "gmp-impl.h"
 
 void
-mpq_set_ui (MP_RAT *dest, unsigned long int num, unsigned long int den)
+mpq_set_ui (mpq_t dest, unsigned long int num, unsigned long int den)
 {
   if (GMP_NUMB_BITS < BITS_PER_ULONG)
     {
diff -r 84d5467c199f -r 8f9c58b1fcf5 mpz/iset_str.c
--- a/mpz/iset_str.c	Sun Jan 19 13:25:03 2014 +0100
+++ b/mpz/iset_str.c	Sun Jan 19 13:39:26 2014 +0100
@@ -1,9 +1,7 @@
-/* mpz_init_set_str(string, base) -- Convert the \0-terminated string
-   STRING in base BASE to a multiple precision integer.  Return a MP_INT
-   structure representing the integer.  Allow white space in the
-   string.  If BASE == 0 determine the base in the C standard way,
-   i.e.  0xhh...h means base 16, 0oo...o means base 8, otherwise
-   assume base 10.
+/* mpz_init_set_str(string, base) -- Convert the \0-terminated string STRING in
+   base BASE to a multiple precision integer.  Allow white space in the string.
+   If BASE == 0 determine the base in the C standard way, i.e.  0xhh...h means
+   base 16, 0oo...o means base 8, otherwise assume base 10.
 
 Copyright 1991, 1993-1995, 2000-2002, 2012 Free Software Foundation, Inc.
 


More information about the gmp-commit mailing list