From 5c972901ec4cca2668d9b294077540200f403e69 Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Sun, 19 Jan 2014 13:25:03 +0100 Subject: Get rid of BYTES_PER_MP_LIMB, most files affected. --- mpq/clear.c | 4 ++-- mpq/clears.c | 4 ++-- mpq/get_d.c | 2 +- mpq/init.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mpq') diff --git a/mpq/clear.c b/mpq/clear.c index 1587ff143..25144f742 100644 --- a/mpq/clear.c +++ b/mpq/clear.c @@ -24,7 +24,7 @@ void mpq_clear (MP_RAT *m) { (*__gmp_free_func) (PTR(NUM(m)), - (size_t) ALLOC(NUM(m)) * BYTES_PER_MP_LIMB); + (size_t) ALLOC(NUM(m)) * GMP_LIMB_BYTES); (*__gmp_free_func) (PTR(DEN(m)), - (size_t) ALLOC(DEN(m)) * BYTES_PER_MP_LIMB); + (size_t) ALLOC(DEN(m)) * GMP_LIMB_BYTES); } diff --git a/mpq/clears.c b/mpq/clears.c index 8b4ad9b89..2070352bb 100644 --- a/mpq/clears.c +++ b/mpq/clears.c @@ -50,9 +50,9 @@ mpq_clears (va_alist) while (x != NULL) { (*__gmp_free_func) (PTR(NUM(x)), - (size_t) ALLOC(NUM(x)) * BYTES_PER_MP_LIMB); + (size_t) ALLOC(NUM(x)) * GMP_LIMB_BYTES); (*__gmp_free_func) (PTR(DEN(x)), - (size_t) ALLOC(DEN(x)) * BYTES_PER_MP_LIMB); + (size_t) ALLOC(DEN(x)) * GMP_LIMB_BYTES); x = va_arg (ap, mpq_ptr); } va_end (ap); diff --git a/mpq/get_d.c b/mpq/get_d.c index f8c73a45d..47a1cbedf 100644 --- a/mpq/get_d.c +++ b/mpq/get_d.c @@ -100,7 +100,7 @@ mpq_get_d (const MP_RAT *src) mp_size_t qsize, prospective_qsize, zeros, chop, tsize; mp_size_t sign_quotient = nsize; long exp; -#define N_QLIMBS (1 + (sizeof (double) + BYTES_PER_MP_LIMB-1) / BYTES_PER_MP_LIMB) +#define N_QLIMBS (1 + (sizeof (double) + GMP_LIMB_BYTES-1) / GMP_LIMB_BYTES) mp_limb_t qarr[N_QLIMBS + 1]; mp_ptr qp = qarr; TMP_DECL; diff --git a/mpq/init.c b/mpq/init.c index 5467f76a6..b218579a7 100644 --- a/mpq/init.c +++ b/mpq/init.c @@ -24,10 +24,10 @@ void mpq_init (MP_RAT *x) { ALLOC(NUM(x)) = 1; - PTR(NUM(x)) = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); + PTR(NUM(x)) = (mp_ptr) (*__gmp_allocate_func) (GMP_LIMB_BYTES); SIZ(NUM(x)) = 0; ALLOC(DEN(x)) = 1; - PTR(DEN(x)) = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); + PTR(DEN(x)) = (mp_ptr) (*__gmp_allocate_func) (GMP_LIMB_BYTES); PTR(DEN(x))[0] = 1; SIZ(DEN(x)) = 1; -- cgit v1.2.1