diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2012-02-23 21:17:47 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2012-02-23 21:17:47 +0100 |
commit | 2b06ef413348321424141880c23fea600940e25b (patch) | |
tree | d2f66feff6187bda4f7440776914199d7eb0d5b1 /mpz/iset_d.c | |
parent | 8e1827335d45a049e434a2b095558f14dd4bf36f (diff) | |
download | gmp-2b06ef413348321424141880c23fea600940e25b.tar.gz |
Use the macros ALLOC etc to access the fields of mpz_t in mpz/*.
Test mpz_abs when it requires a reallocation.
Diffstat (limited to 'mpz/iset_d.c')
-rw-r--r-- | mpz/iset_d.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/iset_d.c b/mpz/iset_d.c index 004b087e5..a128230a5 100644 --- a/mpz/iset_d.c +++ b/mpz/iset_d.c @@ -24,8 +24,8 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ void mpz_init_set_d (mpz_ptr dest, double val) { - dest->_mp_alloc = 1; - dest->_mp_d = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); - dest->_mp_size = 0; + ALLOC (dest) = 1; + PTR (dest) = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); + SIZ (dest) = 0; mpz_set_d (dest, val); } |