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/init.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/init.c')
-rw-r--r-- | mpz/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mpz/init.c b/mpz/init.c index 5fc0ed9d8..413f578b1 100644 --- a/mpz/init.c +++ b/mpz/init.c @@ -24,12 +24,12 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ void mpz_init (mpz_ptr x) { - x->_mp_alloc = 1; - x->_mp_d = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); - x->_mp_size = 0; + ALLOC (x) = 1; + PTR (x) = (mp_ptr) (*__gmp_allocate_func) (BYTES_PER_MP_LIMB); + SIZ (x) = 0; #ifdef __CHECKER__ /* let the low limb look initialized, for the benefit of mpz_get_ui etc */ - x->_mp_d[0] = 0; + PTR (x) = 0; #endif } |