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/cdiv_r.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/cdiv_r.c')
-rw-r--r-- | mpz/cdiv_r.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/cdiv_r.c b/mpz/cdiv_r.c index 749276fbd..a20fd2a62 100644 --- a/mpz/cdiv_r.c +++ b/mpz/cdiv_r.c @@ -24,7 +24,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ void mpz_cdiv_r (mpz_ptr rem, mpz_srcptr dividend, mpz_srcptr divisor) { - mp_size_t divisor_size = divisor->_mp_size; + mp_size_t divisor_size = SIZ (divisor); mpz_t temp_divisor; /* N.B.: lives until function returns! */ TMP_DECL; @@ -43,7 +43,7 @@ mpz_cdiv_r (mpz_ptr rem, mpz_srcptr dividend, mpz_srcptr divisor) mpz_tdiv_r (rem, dividend, divisor); - if ((divisor_size ^ dividend->_mp_size) >= 0 && rem->_mp_size != 0) + if ((divisor_size ^ SIZ (dividend)) >= 0 && SIZ (rem) != 0) mpz_sub (rem, rem, divisor); TMP_FREE; |