diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-06-08 21:54:49 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-06-08 21:54:49 +0200 |
commit | d278771c99ea01862912a8bb2d074ed26798992e (patch) | |
tree | d283f61612e80d0bc072deb689192c57a367f1d7 /mpz/prodlimbs.c | |
parent | 621a1088c537d37f9c4e252d598436da428d067d (diff) | |
download | gmp-d278771c99ea01862912a8bb2d074ed26798992e.tar.gz |
(MPZ_NEWALLOC): New macro. Use it in mpq and some mpz.
Diffstat (limited to 'mpz/prodlimbs.c')
-rw-r--r-- | mpz/prodlimbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/prodlimbs.c b/mpz/prodlimbs.c index bf676419c..867688755 100644 --- a/mpz/prodlimbs.c +++ b/mpz/prodlimbs.c @@ -66,7 +66,7 @@ mpz_prodlimbs (mpz_ptr x, mp_ptr factors, mp_size_t j) size += cy != 0; }; - prod = MPZ_REALLOC (x, size + 1); + prod = MPZ_NEWALLOC (x, size + 1); cy = mpn_mul_1 (prod, factors, size, factors[i]); prod[size] = cy; @@ -86,7 +86,7 @@ mpz_prodlimbs (mpz_ptr x, mp_ptr factors, mp_size_t j) j = mpz_prodlimbs (x2, factors + i, j); i = mpz_prodlimbs (x1, factors, i); size = i + j; - prod = MPZ_REALLOC (x, size); + prod = MPZ_NEWALLOC (x, size); if (i >= j) cy = mpn_mul (prod, PTR(x1), i, PTR(x2), j); else |