From 99d8d3753f1fc879fc15110330e94ef95638363e Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Sun, 19 Jan 2014 13:37:38 +0100 Subject: Use mpq_t inn favour of MP_RAT. --- 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 +- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mpq') diff --git a/mpq/canonicalize.c b/mpq/canonicalize.c index 79e1bf298..a0b81b75e 100644 --- a/mpq/canonicalize.c +++ b/mpq/canonicalize.c @@ -22,7 +22,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #include "gmp-impl.h" void -mpq_canonicalize (MP_RAT *op) +mpq_canonicalize (mpq_t op) { mpz_t gcd; TMP_DECL; diff --git a/mpq/clear.c b/mpq/clear.c index 25144f742..9601acb89 100644 --- a/mpq/clear.c +++ b/mpq/clear.c @@ -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 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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 --git a/mpq/cmp.c b/mpq/cmp.c index f2eadc131..2b2f57f8d 100644 --- a/mpq/cmp.c +++ b/mpq/cmp.c @@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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 --git a/mpq/cmp_ui.c b/mpq/cmp_ui.c index 4557ba575..de991f42e 100644 --- a/mpq/cmp_ui.c +++ b/mpq/cmp_ui.c @@ -23,7 +23,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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 --git a/mpq/get_d.c b/mpq/get_d.c index 47a1cbedf..595f594b4 100644 --- a/mpq/get_d.c +++ b/mpq/get_d.c @@ -90,7 +90,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ 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 --git a/mpq/init.c b/mpq/init.c index b218579a7..f97046740 100644 --- a/mpq/init.c +++ b/mpq/init.c @@ -21,7 +21,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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 --git a/mpq/set_si.c b/mpq/set_si.c index 2fd3cc771..65f0742c2 100644 --- a/mpq/set_si.c +++ b/mpq/set_si.c @@ -22,7 +22,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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 --git a/mpq/set_ui.c b/mpq/set_ui.c index 7d41621eb..a8ed08687 100644 --- a/mpq/set_ui.c +++ b/mpq/set_ui.c @@ -22,7 +22,7 @@ along with the GNU MP Library. If not, see https://www.gnu.org/licenses/. */ #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) { -- cgit v1.2.1