diff options
author | tege <tege@gmplib.org> | 2002-05-07 02:21:22 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-05-07 02:21:22 +0200 |
commit | 912d9fa5881d261ac1eb6f92bf8b6ec5ded7ab1d (patch) | |
tree | de24e96ac3a5b5e943c570f5c1580a6e44e4b701 | |
parent | e3b336ad1cd6458215a595c7a02849314ae8fc26 (diff) | |
download | gmp-912d9fa5881d261ac1eb6f92bf8b6ec5ded7ab1d.tar.gz |
(MPZ_REALLOC): Rewrite to allow the use of _mpz_realloc return value.
-rw-r--r-- | gmp-impl.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gmp-impl.h b/gmp-impl.h index 963c71a53..bc7d8d8c8 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -1081,11 +1081,7 @@ void mpn_copyd _PROTO ((mp_ptr, mp_srcptr, mp_size_t)); } while (0) /* Realloc for an mpz_t WHAT if it has less than NEEDED limbs. */ -#define MPZ_REALLOC(what,needed) \ - do { \ - if ((needed) > ALLOC (what)) \ - _mpz_realloc (what, needed); \ - } while (0) +#define MPZ_REALLOC(z,n) ((n) > ALLOC(z) ? _mpz_realloc(z,n) : PTR(z)) #define MPZ_EQUAL_1_P(z) (SIZ(z)==1 && PTR(z)[0] == 1) |